diff options
author | Erik Johnston <erikj@jki.re> | 2016-08-30 10:50:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-30 10:50:37 +0100 |
commit | 55fc17cf4bdc550ece6feb5d4e5bdf10ab452010 (patch) | |
tree | 16ba7b22e28eedcb4e42043e1487c285fc89546a /synapse/handlers/receipts.py | |
parent | Merge pull request #1050 from matrix-org/erikj/fix_device_sync (diff) | |
parent | Add to slave store (diff) | |
download | synapse-55fc17cf4bdc550ece6feb5d4e5bdf10ab452010.tar.xz |
Merge pull request #1049 from matrix-org/erikj/presence_users_in_room
Use state handler instead of get_users_in_room/get_joined_hosts
Diffstat (limited to 'synapse/handlers/receipts.py')
-rw-r--r-- | synapse/handlers/receipts.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/receipts.py b/synapse/handlers/receipts.py index e62722d78d..726f7308d2 100644 --- a/synapse/handlers/receipts.py +++ b/synapse/handlers/receipts.py @@ -18,6 +18,7 @@ from ._base import BaseHandler from twisted.internet import defer from synapse.util.logcontext import PreserveLoggingContext +from synapse.types import get_domain_from_id import logging @@ -37,6 +38,7 @@ class ReceiptsHandler(BaseHandler): "m.receipt", self._received_remote_receipt ) self.clock = self.hs.get_clock() + self.state = hs.get_state_handler() @defer.inlineCallbacks def received_client_receipt(self, room_id, receipt_type, user_id, @@ -133,7 +135,8 @@ class ReceiptsHandler(BaseHandler): event_ids = receipt["event_ids"] data = receipt["data"] - remotedomains = yield self.store.get_joined_hosts_for_room(room_id) + users = yield self.state.get_current_user_in_room(room_id) + remotedomains = set(get_domain_from_id(u) for u in users) remotedomains = remotedomains.copy() remotedomains.discard(self.server_name) |