mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 11:04:11 -04:00
Start making more things use EventContext rather than event.*
This commit is contained in:
parent
c5c32266d8
commit
6630e1b579
10 changed files with 212 additions and 134 deletions
|
@ -15,7 +15,8 @@
|
|||
import logging
|
||||
|
||||
from synapse.api.errors import StoreError
|
||||
from synapse.api.events.utils import prune_event
|
||||
from synapse.events import FrozenEvent
|
||||
from synapse.events.utils import prune_event
|
||||
from synapse.util.logutils import log_function
|
||||
from synapse.util.logcontext import PreserveLoggingContext, LoggingContext
|
||||
from syutil.base64util import encode_base64
|
||||
|
@ -497,10 +498,7 @@ class SQLBaseStore(object):
|
|||
|
||||
d = json.loads(js)
|
||||
|
||||
ev = self.event_factory.create_event(
|
||||
etype=d["type"],
|
||||
**d
|
||||
)
|
||||
ev = FrozenEvent(d)
|
||||
|
||||
if hasattr(ev, "redacted") and ev.redacted:
|
||||
# Get the redaction event.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue