mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 20:12:15 -04:00
Add a make_event_from_dict
method (#6858)
... and use it in places where it's trivial to do so. This will make it easier to pass room versions into the FrozenEvent constructors.
This commit is contained in:
parent
b08b0a22d5
commit
799001f2c0
13 changed files with 52 additions and 39 deletions
|
@ -22,7 +22,7 @@ import attr
|
|||
from synapse.api.constants import EventTypes, JoinRules, Membership
|
||||
from synapse.api.room_versions import RoomVersions
|
||||
from synapse.event_auth import auth_types_for_event
|
||||
from synapse.events import FrozenEvent
|
||||
from synapse.events import make_event_from_dict
|
||||
from synapse.state.v2 import lexicographical_topological_sort, resolve_events_with_store
|
||||
from synapse.types import EventID
|
||||
|
||||
|
@ -89,7 +89,7 @@ class FakeEvent(object):
|
|||
if self.state_key is not None:
|
||||
event_dict["state_key"] = self.state_key
|
||||
|
||||
return FrozenEvent(event_dict)
|
||||
return make_event_from_dict(event_dict)
|
||||
|
||||
|
||||
# All graphs start with this set of events
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue