From 9cabd8f9cbe6e56c7c8864c3905ec05c5937e593 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Tue, 22 Sep 2020 20:52:07 +0530 Subject: [PATCH] process_client: Don't update activity of unauthenticated users. This allows wrapper `add_logging_data` to be used to add client information for unauthenticated users (or web public guests). --- zerver/decorator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/decorator.py b/zerver/decorator.py index 4c79dbb167..ab850360d1 100644 --- a/zerver/decorator.py +++ b/zerver/decorator.py @@ -168,7 +168,7 @@ def process_client(request: HttpRequest, user_profile: UserProfile, client_name = "website" request.client = get_client(client_name) - if not skip_update_user_activity: + if not skip_update_user_activity and user_profile.is_authenticated: update_user_activity(request, user_profile, query) class InvalidZulipServerError(JsonableError):