mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Move typing handler out of the Handlers object
This commit is contained in:
parent
5adf627551
commit
0cb441fedd
8 changed files with 27 additions and 36 deletions
|
@ -25,8 +25,6 @@ from ..utils import (
|
|||
)
|
||||
|
||||
from synapse.api.errors import AuthError
|
||||
from synapse.handlers.typing import TypingNotificationHandler
|
||||
|
||||
from synapse.types import UserID
|
||||
|
||||
|
||||
|
@ -49,11 +47,6 @@ def _make_edu_json(origin, edu_type, content):
|
|||
return json.dumps(_expect_edu("test", edu_type, content, origin=origin))
|
||||
|
||||
|
||||
class JustTypingNotificationHandlers(object):
|
||||
def __init__(self, hs):
|
||||
self.typing_notification_handler = TypingNotificationHandler(hs)
|
||||
|
||||
|
||||
class TypingNotificationsTestCase(unittest.TestCase):
|
||||
"""Tests typing notifications to rooms."""
|
||||
@defer.inlineCallbacks
|
||||
|
@ -89,9 +82,8 @@ class TypingNotificationsTestCase(unittest.TestCase):
|
|||
http_client=self.mock_http_client,
|
||||
keyring=Mock(),
|
||||
)
|
||||
hs.handlers = JustTypingNotificationHandlers(hs)
|
||||
|
||||
self.handler = hs.get_handlers().typing_notification_handler
|
||||
self.handler = hs.get_typing_handler()
|
||||
|
||||
self.event_source = hs.get_event_sources().sources["typing"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue