zulip/zproject
Greg Price 9869153ae8 push notif: Send a batch of message IDs in one remove payload.
When a bunch of messages with active notifications are all read at
once -- e.g. by the user choosing to mark all messages, or all in a
stream, as read, or just scrolling quickly through a PM conversation
-- there can be a large batch of this information to convey.  Doing it
in a single GCM/FCM message is better for server congestion, and for
the device's battery.

The corresponding client-side logic is in zulip/zulip-mobile#3343 .

Existing clients today only understand one message ID at a time; so
accommodate them by sending individual GCM/FCM messages up to an
arbitrary threshold, with the rest only as a batch.

Also add an explicit test for this logic.  The existing tests
that happen to cause this function to run don't exercise the
last condition, so without a new test `--coverage` complains.
2019-02-26 16:41:54 -08:00
..
jinja2 zproject: Change use of typing.Text to str. 2018-05-10 14:19:49 -07:00
__init__.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
backends.py auth2: Don't use session for passing multiuse invite key. 2019-02-12 15:51:11 -08:00
dev_settings.py export: Fix finding manage.py to export usermessages. 2019-02-15 11:32:36 -08:00
dev_urls.py tooling: Move confirmation_key view to development only views. 2019-01-11 12:45:21 -08:00
email_backends.py tools: Upgrade Pycodestyle and fix new linter errors. 2019-01-31 12:21:41 -08:00
legacy_urls.py urls: Move the json/fetch_api_key endpoint to be an API-style route. 2018-01-08 13:15:52 -05:00
prod_settings_template.py analytics/zilencer/zproject: Remove unused imports. 2019-02-02 17:31:45 -08:00
settings.py push notif: Send a batch of message IDs in one remove payload. 2019-02-26 16:41:54 -08:00
slack_importer_test_settings.py settings: Migrate test settings to modern postgres backend name. 2019-01-23 17:08:24 -08:00
terms.md.template Add TERMS_OF_SERVICE setting. 2016-07-29 20:47:31 -07:00
test_settings.py settings: Migrate test settings to modern postgres backend name. 2019-01-23 17:08:24 -08:00
urls.py settings: Add support for uploading logo for night mode. 2019-02-18 15:15:57 -08:00
wsgi.py python: Mark intentionally unused imports with noop statements. 2019-02-22 16:54:47 -08:00