diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-10-09 07:20:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 07:20:51 -0400 |
commit | a93f3121f8fd1c2b77e003d8e43ce881635bb098 (patch) | |
tree | 2abb73eb4b3fe2334ab5b2c162c1224189740959 /synapse/handlers/read_marker.py | |
parent | Invalidate the cache when an olm fallback key is uploaded (#8501) (diff) | |
download | synapse-a93f3121f8fd1c2b77e003d8e43ce881635bb098.tar.xz |
Add type hints to some handlers (#8505)
Diffstat (limited to 'synapse/handlers/read_marker.py')
-rw-r--r-- | synapse/handlers/read_marker.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/handlers/read_marker.py b/synapse/handlers/read_marker.py index c32f314a1c..a7550806e6 100644 --- a/synapse/handlers/read_marker.py +++ b/synapse/handlers/read_marker.py @@ -14,23 +14,29 @@ # limitations under the License. import logging +from typing import TYPE_CHECKING from synapse.util.async_helpers import Linearizer from ._base import BaseHandler +if TYPE_CHECKING: + from synapse.app.homeserver import HomeServer + logger = logging.getLogger(__name__) class ReadMarkerHandler(BaseHandler): - def __init__(self, hs): + def __init__(self, hs: "HomeServer"): super().__init__(hs) self.server_name = hs.config.server_name self.store = hs.get_datastore() self.read_marker_linearizer = Linearizer(name="read_marker") self.notifier = hs.get_notifier() - async def received_client_read_marker(self, room_id, user_id, event_id): + async def received_client_read_marker( + self, room_id: str, user_id: str, event_id: str + ) -> None: """Updates the read marker for a given user in a given room if the event ID given is ahead in the stream relative to the current read marker. |