summary refs log tree commit diff
path: root/synapse/handlers/presence.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-03-13 11:45:08 +0000
committerGitHub <noreply@github.com>2018-03-13 11:45:08 +0000
commit141c343e030ea32e6c904808dfaded6c839ff8b4 (patch)
treeb0e25cfc9cd8827dac8edf4e0dee242417fd1122 /synapse/handlers/presence.py
parentMerge pull request #2962 from matrix-org/rav/purge_history_txns (diff)
parentFix docstring types (diff)
downloadsynapse-141c343e030ea32e6c904808dfaded6c839ff8b4.tar.xz
Merge pull request #2976 from matrix-org/erikj/replication_registry
Split out edu/query registration to a separate class
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r--synapse/handlers/presence.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index cb158ba962..b11ae78350 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -98,24 +98,26 @@ class PresenceHandler(object):
 
         self.state = hs.get_state_handler()
 
-        self.replication.register_edu_handler(
+        federation_registry = hs.get_federation_registry()
+
+        federation_registry.register_edu_handler(
             "m.presence", self.incoming_presence
         )
-        self.replication.register_edu_handler(
+        federation_registry.register_edu_handler(
             "m.presence_invite",
             lambda origin, content: self.invite_presence(
                 observed_user=UserID.from_string(content["observed_user"]),
                 observer_user=UserID.from_string(content["observer_user"]),
             )
         )
-        self.replication.register_edu_handler(
+        federation_registry.register_edu_handler(
             "m.presence_accept",
             lambda origin, content: self.accept_presence(
                 observed_user=UserID.from_string(content["observed_user"]),
                 observer_user=UserID.from_string(content["observer_user"]),
             )
         )
-        self.replication.register_edu_handler(
+        federation_registry.register_edu_handler(
             "m.presence_deny",
             lambda origin, content: self.deny_presence(
                 observed_user=UserID.from_string(content["observed_user"]),