mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 23:49:42 -05:00
Mark remote device list updates as already handled (#12557)
This commit is contained in:
parent
6d89f1239c
commit
f59e3f4c90
1
changelog.d/12557.misc
Normal file
1
changelog.d/12557.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Reduce unnecessary work when handling remote device list updates.
|
@ -505,7 +505,8 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||||||
"device_list_key", position, users={user_id}, rooms=room_ids
|
"device_list_key", position, users={user_id}, rooms=room_ids
|
||||||
)
|
)
|
||||||
|
|
||||||
# We may need to do some processing asynchronously.
|
# We may need to do some processing asynchronously for local user IDs.
|
||||||
|
if self.hs.is_mine_id(user_id):
|
||||||
self._handle_new_device_update_async()
|
self._handle_new_device_update_async()
|
||||||
|
|
||||||
async def notify_user_signature_update(
|
async def notify_user_signature_update(
|
||||||
|
@ -1748,7 +1748,8 @@ class DeviceStore(DeviceWorkerStore, DeviceBackgroundUpdateStore):
|
|||||||
device_id,
|
device_id,
|
||||||
room_id,
|
room_id,
|
||||||
stream_id,
|
stream_id,
|
||||||
False,
|
# We only need to calculate outbound pokes for local users
|
||||||
|
not self.hs.is_mine_id(user_id),
|
||||||
encoded_context,
|
encoded_context,
|
||||||
)
|
)
|
||||||
for room_id in room_ids
|
for room_id in room_ids
|
||||||
|
@ -29,7 +29,7 @@ class DeviceStoreTestCase(HomeserverTestCase):
|
|||||||
for device_id in device_ids:
|
for device_id in device_ids:
|
||||||
stream_id = self.get_success(
|
stream_id = self.get_success(
|
||||||
self.store.add_device_change_to_streams(
|
self.store.add_device_change_to_streams(
|
||||||
"user_id", [device_id], ["!some:room"]
|
user_id, [device_id], ["!some:room"]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user