From 2264a07c03a03fd8fe2152c44f5ed6bc0f9da22d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 19 Dec 2013 15:27:14 -0500 Subject: [PATCH] Update server-side app checks to handle the new app names. (imported from commit da7b2c06b413add1881b2d80a89794d0db9c810f) --- zerver/lib/actions.py | 3 ++- zerver/views/__init__.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 32b5f3fb78..fb4cdf961e 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -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 diff --git a/zerver/views/__init__.py b/zerver/views/__init__.py index f5db0b71c2..6d1626a552 100644 --- a/zerver/views/__init__.py +++ b/zerver/views/__init__.py @@ -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