mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 07:54:59 -04:00
Use state handler instead of get_users_in_room/get_joined_hosts
This commit is contained in:
parent
3cf15edef7
commit
bed10f9880
12 changed files with 44 additions and 27 deletions
|
@ -124,6 +124,15 @@ class StateHandler(object):
|
|||
|
||||
defer.returnValue(state)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_current_user_in_room(self, room_id):
|
||||
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
||||
group, state_ids = yield self.resolve_state_groups(room_id, latest_event_ids)
|
||||
joined_users = yield self.store.get_joined_users_from_context(
|
||||
room_id, group, state_ids
|
||||
)
|
||||
defer.returnValue(joined_users)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def compute_event_context(self, event, old_state=None):
|
||||
""" Fills out the context with the `current state` of the graph. The
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue