summary refs log tree commit diff
path: root/synapse/handlers/presence.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-06-25 14:08:28 +0100
committerGitHub <noreply@github.com>2018-06-25 14:08:28 +0100
commit07cad26d65dcf237643a43ff2bdfac73ca7a7257 (patch)
tree3532a82f5db52b278f7049dab9ddb53d5b3e3e25 /synapse/handlers/presence.py
parentRevert "Merge pull request #3431 from matrix-org/rav/erasure_visibility" (diff)
downloadsynapse-07cad26d65dcf237643a43ff2bdfac73ca7a7257.tar.xz
Remove all global reactor imports & pass it around explicitly (#3424)
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r--synapse/handlers/presence.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 7fe568132f..7db59fba00 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -22,7 +22,7 @@ The methods that define policy are:
     - should_notify
 """
 
-from twisted.internet import defer, reactor
+from twisted.internet import defer
 from contextlib import contextmanager
 
 from six import itervalues, iteritems
@@ -179,7 +179,7 @@ class PresenceHandler(object):
         # have not yet been persisted
         self.unpersisted_users_changes = set()
 
-        reactor.addSystemEventTrigger("before", "shutdown", self._on_shutdown)
+        hs.get_reactor().addSystemEventTrigger("before", "shutdown", self._on_shutdown)
 
         self.serial_to_user = {}
         self._next_serial = 1