mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Update server-side app checks to handle the new app names.
(imported from commit da7b2c06b413add1881b2d80a89794d0db9c810f)
This commit is contained in:
@@ -302,7 +302,8 @@ def do_send_messages(messages):
|
||||
|
||||
for um in ums_to_create:
|
||||
sent_by_human = (message['message'].sending_client.name.lower() in \
|
||||
['website', 'ios', 'android']) or \
|
||||
['zulipandroid', 'zulipios', 'zulipdesktop',
|
||||
'website', 'ios', 'android']) or \
|
||||
('desktop app' in message['message'].sending_client.name.lower())
|
||||
if um.user_profile.id == message['message'].sender.id and sent_by_human:
|
||||
um.flags |= UserMessage.flags.read
|
||||
|
||||
@@ -912,7 +912,7 @@ def update_pointer_backend(request, user_profile,
|
||||
user_profile.save(update_fields=["pointer"])
|
||||
request._log_data["extra"] = "[%s]" % (pointer,)
|
||||
|
||||
if request.client.name.lower() in ['android']:
|
||||
if request.client.name.lower() in ['android', "zulipandroid"]:
|
||||
# Until we handle the new read counts in the Android app
|
||||
# natively, this is a shim that will mark as read any messages
|
||||
# up until the pointer move
|
||||
|
||||
Reference in New Issue
Block a user