diff options
author | Sean Quah <seanq@matrix.org> | 2022-08-30 19:38:13 +0100 |
---|---|---|
committer | Sean Quah <seanq@matrix.org> | 2022-09-08 14:01:46 +0100 |
commit | 766b136db3042d990f75ae87898c7ef2aef8371a (patch) | |
tree | 3b0fde6622f5eeb9b58c3f7e214578fa046b8d10 | |
parent | Fix bug in device list caching when remote users leave rooms (diff) | |
download | synapse-766b136db3042d990f75ae87898c7ef2aef8371a.tar.xz |
Remove redundant `mark_remote_user_device_list_as_unsubscribed` call
Now that we are handling device list unsubscriptions in the event persistence code, it's no longer necessary to mark device lists as unsubscribed elsewhere.
-rw-r--r-- | synapse/handlers/device.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index c5ac169644..901e2310b7 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -45,7 +45,6 @@ from synapse.types import ( JsonDict, StreamKeyType, StreamToken, - UserID, get_domain_from_id, get_verify_key_from_cross_signing_key, ) @@ -324,8 +323,6 @@ class DeviceHandler(DeviceWorkerHandler): self.device_list_updater.incoming_device_list_update, ) - hs.get_distributor().observe("user_left_room", self.user_left_room) - # Whether `_handle_new_device_update_async` is currently processing. self._handle_new_device_update_is_processing = False @@ -569,14 +566,6 @@ class DeviceHandler(DeviceWorkerHandler): StreamKeyType.DEVICE_LIST, position, users=[from_user_id] ) - async def user_left_room(self, user: UserID, room_id: str) -> None: - user_id = user.to_string() - room_ids = await self.store.get_rooms_for_user(user_id) - if not room_ids: - # We no longer share rooms with this user, so we'll no longer - # receive device updates. Mark this in DB. - await self.store.mark_remote_user_device_list_as_unsubscribed(user_id) - async def store_dehydrated_device( self, user_id: str, |