mirror of https://github.com/zulip/zulip.git
Support request._query in update_user_activity().
If request._query is set in the call to update_user_activity(), we will use that instead of request.META['PATH_INFO'] for the query field of the UserActivity row we write. (imported from commit fcee30098e1c7c5cb4195a1e5905fc7b88af804f)
This commit is contained in:
parent
cab71ab3f9
commit
97adbedfca
|
@ -43,7 +43,13 @@ def update_user_activity(request, user_profile):
|
|||
# redundant to log that here as well.
|
||||
if request.META["PATH_INFO"] == '/json/update_active_status':
|
||||
return
|
||||
event={'query': request.META["PATH_INFO"],
|
||||
|
||||
if hasattr(request, '_query'):
|
||||
query = request._query
|
||||
else:
|
||||
query = request.META['PATH_INFO']
|
||||
|
||||
event={'query': query,
|
||||
'user_profile_id': user_profile.id,
|
||||
'time': datetime_to_timestamp(now()),
|
||||
'client': request.client.name}
|
||||
|
|
Loading…
Reference in New Issue