mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 16:44:49 -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
|
@ -20,7 +20,7 @@ from twisted.internet import defer
|
|||
from synapse.api.auth import Auth
|
||||
from synapse.api.constants import EventTypes, Membership
|
||||
from synapse.api.room_versions import RoomVersions
|
||||
from synapse.events import FrozenEvent
|
||||
from synapse.events import make_event_from_dict
|
||||
from synapse.events.snapshot import EventContext
|
||||
from synapse.state import StateHandler, StateResolutionHandler
|
||||
|
||||
|
@ -66,7 +66,7 @@ def create_event(
|
|||
|
||||
d.update(kwargs)
|
||||
|
||||
event = FrozenEvent(d)
|
||||
event = make_event_from_dict(d)
|
||||
|
||||
return event
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue