summary refs log tree commit diff
path: root/synapse/push/push_tools.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Track notification counts per thread (implement MSC3773). (#13776)Patrick Cloke2022-10-041-2/+7
| | | | | | | | When retrieving counts of notifications segment the results based on the thread ID, but choose whether to return them as individual threads or as a single summed field by letting the client opt-in via a sync flag. The summarization code is also updated to be per thread, instead of per room.
* Concurrently collect room unread counts for push badges (#13765)Nick Mills-Barrett2022-09-091-3/+10
| | | | | | | Most of the time this function is heavily cached, but when that isn't the case fetching the counts room by room slows down push delivery on users with many (thousands) of rooms. Signed off by Nick @ Beeper.
* Speed up `get_unread_event_push_actions_by_room` (#13005)Erik Johnston2022-06-151-20/+13
| | | | | | | | | | | Fixes #11887 hopefully. The core change here is that `event_push_summary` now holds a summary of counts up until a much more recent point, meaning that the range of rows we need to count in `event_push_actions` is much smaller. This needs two major changes: 1. When we get a receipt we need to recalculate `event_push_summary` rather than just delete it 2. The logic for deleting `event_push_actions` is now divorced from calculating `event_push_summary`. In future it would be good to calculate `event_push_summary` while we persist a new event (it should just be a case of adding one to the relevant rows in `event_push_summary`), as that will further simplify the get counts logic and remove the need for us to periodically update `event_push_summary` in a background job.
* Rename storage classes (#12913)Erik Johnston2022-05-311-2/+2
|
* Implement changes to MSC2285 (hidden read receipts) (#12168)Šimon Brandner2022-05-041-1/+3
| | | | | * Changes hidden read receipts to be a separate receipt type (instead of a field on `m.read`). * Updates the `/receipts` endpoint to accept `m.fully_read`.
* Add type hints to event_push_actions. (#11594)Patrick Cloke2021-12-211-2/+2
|
* Add a constant for receipt types (m.read). (#11531)Patrick Cloke2021-12-081-1/+2
| | | And expand some type hints in the receipts storage module.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Add type hints for HTTP and email pushers. (#8880)Patrick Cloke2020-12-071-1/+6
|
* Add a config option to change whether unread push notification counts are ↵Andrew Morgan2020-11-301-5/+11
| | | | | | | | per-message or per-room (#8820) This PR adds a new config option to the `push` section of the homeserver config, `group_unread_count_by_room`. By default Synapse will group push notifications by room (so if you have 1000 unread messages, if they lie in 55 rooms, you'll see an unread count on your phone of 55). However, it is also useful to be able to send out the true count of unread messages if desired. If `group_unread_count_by_room` is set to `false`, then with the above example, one would see an unread count of 1000 (email anyone?).
* Unread counts fixes (#8254)Brendan Abolivier2020-09-041-1/+1
| | | | | | | | | | | | | | * Fixup `ALTER TABLE` database queries Make the new columns nullable, because doing otherwise can wedge a server with a big database, as setting a default value rewrites the table. * Switch back to using the notifications count in the push badge Clients are likely to be confused if we send a push but the badge count is the unread messages one, and not the notifications one. * Changelog
* Re-implement unread counts (again) (#8059)Brendan Abolivier2020-09-021-1/+1
|
* Revert #7736 (#8039)Brendan Abolivier2020-08-061-4/+13
|
* Re-implement unread counts (#7736)Brendan Abolivier2020-07-291-13/+4
|
* Convert push to async/await. (#7948)Patrick Cloke2020-07-271-13/+9
|
* Back out MSC2625 implementation (#7761)Brendan Abolivier2020-07-011-4/+1
|
* Fix unread counts in syncBrendan Abolivier2020-06-171-1/+1
| | | | | * Always return an unread_count in get_unread_event_push_actions_by_room_for_user * Don't always expect unread_count to be there so we don't take out sync entirely if something goes wrong
* Add a new unread_counter to sync responsesBrendan Abolivier2020-06-101-1/+4
|
* Add `local_current_membership` table (#6655)Erik Johnston2020-01-151-1/+1
| | | | | | | Currently we rely on `current_state_events` to figure out what rooms a user was in and their last membership event in there. However, if the server leaves the room then the table may be cleaned up and that information is lost. So lets add a table that separately holds that information.
* Port to use state storageErik Johnston2019-10-301-4/+5
|
* Replace returnValue with return (#5736)Amber Brown2019-07-231-2/+2
|
* Run Black. (#5482)Amber Brown2019-06-201-5/+3
|
* run isortAmber Brown2018-07-091-3/+2
|
* Don't convert to deferreds when not necessaryErik Johnston2017-03-301-5/+2
|
* Don't recreate so many setsErik Johnston2017-03-161-4/+4
|
* Get state at event rather than for room in pushErik Johnston2017-01-171-1/+1
|
* Fix up push to use get_current_state_idsErik Johnston2016-08-251-6/+7
|
* Preserve some logcontextsErik Johnston2016-08-241-4/+5
|
* TypoDavid Baker2016-07-281-1/+1
|
* even more pep8David Baker2016-06-241-0/+1
|
* Use similar naming we use in email notifs for pushDavid Baker2016-06-241-17/+16
| | | | Fixes https://github.com/vector-im/vector-web/issues/1654
* increment badge count per missed convo, not per msgMatthew Hodgson2016-05-181-1/+3
|
* Only pass in what we needDavid Baker2016-04-071-8/+8
|
* Make pushers use the event_push_actions table instead of listening on an ↵David Baker2016-04-061-0/+66
event stream & running the rules again. Sytest passes, but remaining to do: * Make badges work again * Remove old, unused code