diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-19 09:37:50 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-19 09:37:50 +0000 |
commit | e5ad2e52679d85aa3b158294161dd87bde3719b8 (patch) | |
tree | 9616f09c9652e92b5c8ce63ccd1a5129e87aa796 /synapse/rest/client/v2_alpha/receipts.py | |
parent | Merge pull request #573 from matrix-org/erikj/sync_fix (diff) | |
parent | "You are not..." (diff) | |
download | synapse-e5ad2e52679d85aa3b158294161dd87bde3719b8.tar.xz |
Merge pull request #582 from matrix-org/erikj/presence
Rewrite presence for performance.
Diffstat (limited to 'synapse/rest/client/v2_alpha/receipts.py')
-rw-r--r-- | synapse/rest/client/v2_alpha/receipts.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/rest/client/v2_alpha/receipts.py b/synapse/rest/client/v2_alpha/receipts.py index eb4b369a3d..b831d8c95e 100644 --- a/synapse/rest/client/v2_alpha/receipts.py +++ b/synapse/rest/client/v2_alpha/receipts.py @@ -37,6 +37,7 @@ class ReceiptRestServlet(RestServlet): self.hs = hs self.auth = hs.get_auth() self.receipts_handler = hs.get_handlers().receipts_handler + self.presence_handler = hs.get_handlers().presence_handler @defer.inlineCallbacks def on_POST(self, request, room_id, receipt_type, event_id): @@ -45,6 +46,8 @@ class ReceiptRestServlet(RestServlet): if receipt_type != "m.read": raise SynapseError(400, "Receipt type must be 'm.read'") + yield self.presence_handler.bump_presence_active_time(requester.user) + yield self.receipts_handler.received_client_receipt( room_id, receipt_type, |