diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-05-17 10:54:39 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-05-17 10:54:39 +0100 |
commit | c4c98ce8da402e3b36081e79a63fd2726ec92db0 (patch) | |
tree | 2e03fdf537731d9a8d1e8f7a0feaaeb0c9d84eb8 /synapse/handlers/sync.py | |
parent | Merge pull request #786 from matrix-org/matthew/email_notifs_tuning (diff) | |
parent | Merge remote-tracking branch 'origin/develop' into markjh/liberate_sync_handler (diff) | |
download | synapse-c4c98ce8da402e3b36081e79a63fd2726ec92db0.tar.xz |
Merge pull request #790 from matrix-org/markjh/liberate_sync_handler
Move SyncHandler out of the Handlers object
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r-- | synapse/handlers/sync.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index 4bdb0aef84..9ebfccc8bf 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from ._base import BaseHandler - from synapse.streams.config import PaginationConfig from synapse.api.constants import Membership, EventTypes from synapse.util.async import concurrently_execute @@ -133,10 +131,12 @@ class SyncResult(collections.namedtuple("SyncResult", [ ) -class SyncHandler(BaseHandler): +class SyncHandler(object): def __init__(self, hs): - super(SyncHandler, self).__init__(hs) + self.store = hs.get_datastore() + self.notifier = hs.get_notifier() + self.presence_handler = hs.get_presence_handler() self.event_sources = hs.get_event_sources() self.clock = hs.get_clock() self.response_cache = ResponseCache() @@ -639,7 +639,7 @@ class SyncHandler(BaseHandler): # For each newly joined room, we want to send down presence of # existing users. - presence_handler = self.hs.get_presence_handler() + presence_handler = self.presence_handler extra_presence_users = set() for room_id in newly_joined_rooms: users = yield self.store.get_users_in_room(event.room_id) |