Update server-side app checks to handle the new app names.

(imported from commit da7b2c06b413add1881b2d80a89794d0db9c810f)
This commit is contained in:
Tim Abbott
2013-12-19 15:27:14 -05:00
parent b2d01e2da0
commit 2264a07c03
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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