diff options
author | Erik Johnston <erik@matrix.org> | 2016-11-16 14:28:03 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-11-16 14:47:52 +0000 |
commit | 59ef517e6bc63b2613f18c9b85356a0f973f5698 (patch) | |
tree | 277cafe08a8b1dff46acbee2273c59a859386a53 /synapse/handlers/presence.py | |
parent | Add transaction queue and transport layer to DI (diff) | |
download | synapse-59ef517e6bc63b2613f18c9b85356a0f973f5698.tar.xz |
Use new federation_sender DI
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r-- | synapse/handlers/presence.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index b047ae2250..1b89dc6274 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -91,28 +91,29 @@ class PresenceHandler(object): self.store = hs.get_datastore() self.wheel_timer = WheelTimer() self.notifier = hs.get_notifier() - self.federation = hs.get_replication_layer() + self.replication = hs.get_replication_layer() + self.federation = hs.get_federation_sender() self.state = hs.get_state_handler() - self.federation.register_edu_handler( + self.replication.register_edu_handler( "m.presence", self.incoming_presence ) - self.federation.register_edu_handler( + self.replication.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.federation.register_edu_handler( + self.replication.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.federation.register_edu_handler( + self.replication.register_edu_handler( "m.presence_deny", lambda origin, content: self.deny_presence( observed_user=UserID.from_string(content["observed_user"]), |