mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 13:54:55 -04:00
Update get_users_in_room
mis-use to get hosts with dedicated get_current_hosts_in_room
(#13605)
See https://github.com/matrix-org/synapse/pull/13575#discussion_r953023755
This commit is contained in:
parent
d58615c82c
commit
1a209efdb2
6 changed files with 31 additions and 17 deletions
|
@ -26,7 +26,7 @@ from synapse.metrics.background_process_metrics import (
|
|||
)
|
||||
from synapse.replication.tcp.streams import TypingStream
|
||||
from synapse.streams import EventSource
|
||||
from synapse.types import JsonDict, Requester, StreamKeyType, UserID, get_domain_from_id
|
||||
from synapse.types import JsonDict, Requester, StreamKeyType, UserID
|
||||
from synapse.util.caches.stream_change_cache import StreamChangeCache
|
||||
from synapse.util.metrics import Measure
|
||||
from synapse.util.wheel_timer import WheelTimer
|
||||
|
@ -362,8 +362,9 @@ class TypingWriterHandler(FollowerTypingHandler):
|
|||
)
|
||||
return
|
||||
|
||||
users = await self.store.get_users_in_room(room_id)
|
||||
domains = {get_domain_from_id(u) for u in users}
|
||||
domains = await self._storage_controllers.state.get_current_hosts_in_room(
|
||||
room_id
|
||||
)
|
||||
|
||||
if self.server_name in domains:
|
||||
logger.info("Got typing update from %s: %r", user_id, content)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue