zulip/zerver
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
..
data_import streams: Prevent creation of multi-line stream descriptions. 2019-02-20 12:28:00 -08:00
lib push notif: Send a batch of message IDs in one remove payload. 2019-02-26 16:41:54 -08:00
management python: Remove unused imports. 2019-02-22 16:54:36 -08:00
migrations python: Remove unused imports. 2019-02-22 16:54:36 -08:00
openapi settings: Add support for uploading logo for night mode. 2019-02-18 15:15:57 -08:00
templatetags zerver core: Remove unused imports. 2019-02-02 17:41:24 -08:00
tests push notif: Send a batch of message IDs in one remove payload. 2019-02-26 16:41:54 -08:00
tornado tornado: Remove unused imports. 2019-02-02 17:33:13 -08:00
views python: Remove unused imports. 2019-02-22 16:54:36 -08:00
webhooks webhooks/pagerduty: Account for missing trigger summary data. 2019-02-22 15:59:28 -08:00
worker push notif: Send a batch of message IDs in one remove payload. 2019-02-26 16:41:54 -08:00
__init__.py caching: Add configuration class for post-migration cache flushing. 2016-10-27 23:26:34 -07:00
apps.py python: Mark intentionally unused imports with noop statements. 2019-02-22 16:54:47 -08:00
context_processors.py settings: Add support for uploading logo for night mode. 2019-02-18 15:15:57 -08:00
decorator.py zerver core: Remove unused imports. 2019-02-02 17:41:24 -08:00
filters.py error reports: Ensure we filter API keys from query strings. 2018-10-19 15:03:14 -07:00
forms.py zerver core: Remove unused imports. 2019-02-02 17:41:24 -08:00
logging_handlers.py zerver core: Remove unused imports. 2019-02-02 17:41:24 -08:00
middleware.py open graph: Remove extraneous spaces from descriptions. 2019-02-11 12:05:19 -08:00
models.py settings: Add support for uploading logo for night mode. 2019-02-18 15:15:57 -08:00
signals.py zerver core: Remove unused imports. 2019-02-02 17:41:24 -08:00
static_header.txt Update static_header.txt with new license information. 2016-08-13 00:37:21 -07:00