summary refs log tree commit diff
path: root/synapse/handlers/receipts.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Allow moving account data and receipts streams off master (#9104)Erik Johnston2021-01-181-5/+22
|
* Add type hints to the receipts and user directory handlers. (#8976)Patrick Cloke2021-01-041-11/+19
|
* Allow spam-checker modules to be provide async methods. (#8890)David Teller2020-12-111-5/+2
| | | | Spam checker modules can now provide async methods. This is implemented in a backwards-compatible manner.
* Improve appservice handler to send only the most recent read receipts when ↵Will Hunt2020-11-181-1/+2
| | | | | | | | | | | | | | | | | | | no stream_id is stored. (#8744) * Make this line debug (it's noisy) * Don't include from_key for presence if we are at 0 * Limit read receipts for all rooms to 100 * changelog.d/8744.bugfix * Allow from_key to be None * Update 8744.bugfix * The from_key is superflous * Update comment
* Send some ephemeral events to appservices (#8437)Will Hunt2020-10-151-1/+34
| | | Optionally sends typing, presence, and read receipt information to appservices.
* Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-1/+1
| | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* Clean up types for PaginationConfig (#8250)Erik Johnston2020-09-081-15/+0
| | | This removes `SourcePaginationConfig` and `get_pagination_rows`. The reasoning behind this is that these generic classes/functions erased the types of the IDs it used (i.e. instead of passing around `StreamToken` it'd pass in e.g. `token.room_key`, which don't have uniform types).
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-1/+1
|
* Convert _base, profile, and _receipts handlers to async/await (#7860)Patrick Cloke2020-07-171-10/+6
|
* Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-1/+1
| | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Port receipt and read markers to async/waitErik Johnston2019-10-291-25/+12
|
* Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-1/+1
| | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
* Merge pull request #5743 from matrix-org/erikj/log_origin_receipts_mismatchErik Johnston2019-07-241-13/+22
|\ | | | | Log when we receive receipt from a different origin
| * Log when we receive receipt from a different originErik Johnston2019-07-231-13/+22
| |
* | Replace returnValue with return (#5736)Amber Brown2019-07-231-7/+7
|/
* Run Black. (#5482)Amber Brown2019-06-201-18/+8
|
* Batch up outgoing read-receipts to reduce federation traffic. (#4890)Richard van der Hoff2019-03-201-1/+1
| | | | Rate-limit outgoing read-receipts as per #4730.
* Move client receipt processing to federation sender worker.Richard van der Hoff2019-03-131-33/+4
| | | | | This is mostly a prerequisite for #4730, but also fits with the general theme of "move everything off the master that we possibly can".
* declare a ReadReceipt classRichard van der Hoff2019-03-131-24/+22
| | | | | I'm going to use this in queues and things, so it'll be useful to give it more of a structure.
* Clean up read-receipt handling.Richard van der Hoff2019-03-041-59/+44
| | | | | | | Remove a call to run_as_background_process: there is no need to run this as a background process, because build_and_send_edu does not block. We may as well inline the whole of _push_remotes.
* Avoid rebuilding Edu objects in worker mode (#4770)Richard van der Hoff2019-03-041-1/+1
| | | | | In worker mode, on the federation sender, when we receive an edu for sending over the replication socket, it is parsed into an Edu object. There is no point extracting the contents of it so that we can then immediately build another Edu.
* Run push_receipts_to_remotes as background job (#4707)Richard van der Hoff2019-02-211-34/+34
| | | I suspect the CPU usage metrics for this are going to /dev/null at the moment.
* Remove redundant run_as_background_process() from pusherpoolRichard van der Hoff2018-10-221-1/+1
| | | | | | | `on_new_notifications` and `on_new_receipts` in `HttpPusher` and `EmailPusher` now always return synchronously, so we can remove the `defer.gatherResults` on their results, and the `run_as_background_process` wrappers can be removed too because the PusherPool methods will now complete quickly enough.
* Fix logcontexts for running pushersRichard van der Hoff2018-08-171-10/+8
| | | | | | | First of all, avoid resetting the logcontext before running the pushers, to fix the "Starting db txn 'get_all_updated_receipts' from sentinel context" warning. Instead, give them their own "background process" logcontexts.
* run isortAmber Brown2018-07-091-6/+4
|
* Improve exception handling for background processesRichard van der Hoff2018-04-271-29/+32
| | | | | | | | | | | | | | | | | | There were a bunch of places where we fire off a process to happen in the background, but don't have any exception handling on it - instead relying on the unhandled error being logged when the relevent deferred gets garbage-collected. This is unsatisfactory for a number of reasons: - logging on garbage collection is best-effort and may happen some time after the error, if at all - it can be hard to figure out where the error actually happened. - it is logged as a scary CRITICAL error which (a) I always forget to grep for and (b) it's not really CRITICAL if a background process we don't care about fails. So this is an attempt to add exception handling to everything we fire off into the background.
* Split out edu/query registration to a separate classErik Johnston2018-03-131-1/+1
|
* fix a logcontext leak in read receipt handlingRichard van der Hoff2017-10-111-0/+4
|
* Don't recreate so many setsErik Johnston2017-03-161-3/+2
|
* Fix ignored read-receiptsRichard van der Hoff2016-12-081-1/+5
| | | | | Don't ignore read-receipts which arrive in the same EDU as a read-receipt for an old event.
* Use new federation_sender DIErik Johnston2016-11-161-2/+2
|
* Clobber EDUs in send queueErik Johnston2016-09-091-0/+1
|
* Use state handler instead of get_users_in_room/get_joined_hostsErik Johnston2016-08-261-1/+4
|
* Replaces calls to fetch_room_distributions_into with get_joined_hosts_for_roomMark Haines2016-05-161-6/+5
|
* Add comments on min_stream_idDavid Baker2016-04-071-0/+1
| | | | saying that the min stream id won't be completely accurate all the time
* Send badge count pushes.David Baker2016-04-071-4/+17
| | | | Also fix bugs with retrying.
* Add enviroment variable SYNAPSE_CACHE_FACTOR, default it to 0.1Erik Johnston2016-03-011-2/+0
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Open up /events to anonymous users for room events onlyDaniel Wagner-Hall2015-11-051-4/+2
| | | | Squash-merge of PR #345 from daniel/anonymousevents
* Fix receipts for room initial syncErik Johnston2015-10-221-7/+1
|
* Re-enable receiptsErik Johnston2015-08-131-2/+0
|
* Disable receipts for nowMatrix2015-07-221-0/+2
|
* Don't do any database hits in receipt handling if from_key == to_keyMatrix2015-07-181-0/+3
|
* DocsErik Johnston2015-07-141-3/+8
|
* CommentsErik Johnston2015-07-131-4/+12
|
* Remove spurious commentErik Johnston2015-07-091-2/+0
|
* Integer timestampsErik Johnston2015-07-091-1/+1
|
* Change format of receipts to allow inclusion of dataErik Johnston2015-07-091-8/+16
|
* Add a cache to fetching of receipt streamsErik Johnston2015-07-081-24/+7
|
* Split receipt events up into one per roomErik Johnston2015-07-081-30/+21
|
* Hook up receipts to v1 initialSyncErik Johnston2015-07-081-1/+44
|
* Wire together receipts and the notifer/federationErik Johnston2015-07-071-21/+60
|
* Fix various typosErik Johnston2015-07-071-2/+4
|
* Consolidate duplicate code in notifierErik Johnston2015-07-021-2/+2
|
* Add basic ReceiptHandlerErik Johnston2015-07-011-0/+130