mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		@@ -43,7 +43,13 @@ def update_user_activity(request, user_profile):
 | 
				
			|||||||
    # redundant to log that here as well.
 | 
					    # redundant to log that here as well.
 | 
				
			||||||
    if request.META["PATH_INFO"] == '/json/update_active_status':
 | 
					    if request.META["PATH_INFO"] == '/json/update_active_status':
 | 
				
			||||||
        return
 | 
					        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,
 | 
					           'user_profile_id': user_profile.id,
 | 
				
			||||||
           'time': datetime_to_timestamp(now()),
 | 
					           'time': datetime_to_timestamp(now()),
 | 
				
			||||||
           'client': request.client.name}
 | 
					           'client': request.client.name}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user