mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
decorator: Don't block ZulipElectron name in json views.
This fixes the logging of the ZulipElectron client in server logs. Message sending is still logged as "website"; that will be fixed soon.
This commit is contained in:
@@ -136,7 +136,7 @@ def get_client_name(request, is_json_view):
|
||||
# We could check for a browser's name being "Mozilla", but
|
||||
# e.g. Opera and MobileSafari don't set that, and it seems
|
||||
# more robust to just key off whether it was a json view
|
||||
if user_agent["name"] != "ZulipDesktop" and is_json_view:
|
||||
if is_json_view and user_agent["name"] not in {"ZulipDesktop", "ZulipElectron"}:
|
||||
# Avoid changing the client string for browsers Once this
|
||||
# is out to prod, we can name the field to something like
|
||||
# Browser for consistency.
|
||||
|
||||
Reference in New Issue
Block a user