Refactor resolve_state_groups_for_events to not pull out full state when no state resolution happens. (#12775)

This commit is contained in:
Shay 2022-05-18 10:15:52 -07:00 committed by GitHub
parent 3d8839c30c
commit 19d79b6ebe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 23 deletions

View file

@ -129,6 +129,19 @@ class _DummyStore:
async def get_room_version_id(self, room_id):
return RoomVersions.V1.identifier
async def get_state_group_for_events(self, event_ids):
res = {}
for event in event_ids:
res[event] = self._event_to_state_group[event]
return res
async def get_state_for_groups(self, groups):
res = {}
for group in groups:
state = self._group_to_state[group]
res[group] = state
return res
class DictObj(dict):
def __init__(self, **kwargs):