summary refs log tree commit diff
path: root/synapse/handlers/receipts.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-26 14:54:30 +0100
committerErik Johnston <erik@matrix.org>2016-08-26 14:54:30 +0100
commitbed10f9880068306be3fcdd15a51b1712c6159f2 (patch)
tree5a7fee7675320aff0983da1e5d787de88026fd9a /synapse/handlers/receipts.py
parentMerge pull request #1048 from matrix-org/erikj/fix_mail_name (diff)
downloadsynapse-bed10f9880068306be3fcdd15a51b1712c6159f2.tar.xz
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.py5
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)