mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Use servers list approx to send read receipts when in partial state (#14549)
Signed-off-by: Mathieu Velten <mathieuv@matrix.org>
This commit is contained in:
parent
ecb6fe9d9c
commit
4569eda944
1
changelog.d/14549.misc
Normal file
1
changelog.d/14549.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Faster joins: use servers list approximation to send read receipts when in partial state instead of waiting for the full state of the room.
|
@ -647,7 +647,7 @@ class FederationSender(AbstractFederationSender):
|
|||||||
room_id = receipt.room_id
|
room_id = receipt.room_id
|
||||||
|
|
||||||
# Work out which remote servers should be poked and poke them.
|
# Work out which remote servers should be poked and poke them.
|
||||||
domains_set = await self._storage_controllers.state.get_current_hosts_in_room(
|
domains_set = await self._storage_controllers.state.get_current_hosts_in_room_or_partial_state_approximation(
|
||||||
room_id
|
room_id
|
||||||
)
|
)
|
||||||
domains = [
|
domains = [
|
||||||
|
@ -38,6 +38,10 @@ class FederationSenderReceiptsTestCases(HomeserverTestCase):
|
|||||||
return_value=make_awaitable({"test", "host2"})
|
return_value=make_awaitable({"test", "host2"})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
hs.get_storage_controllers().state.get_current_hosts_in_room_or_partial_state_approximation = (
|
||||||
|
hs.get_storage_controllers().state.get_current_hosts_in_room
|
||||||
|
)
|
||||||
|
|
||||||
return hs
|
return hs
|
||||||
|
|
||||||
@override_config({"send_federation": True})
|
@override_config({"send_federation": True})
|
||||||
|
Loading…
Reference in New Issue
Block a user