mirror of
https://github.com/element-hq/synapse
synced 2024-09-04 19:30:06 +00:00
Update to use replaces_state rather than prev_state
This commit is contained in:
parent
c6766d45b5
commit
233969bb58
1 changed files with 4 additions and 2 deletions
|
@ -386,8 +386,10 @@ class FederationHandler(BaseHandler):
|
||||||
event = yield self.store.get_event(event_id)
|
event = yield self.store.get_event(event_id)
|
||||||
if hasattr(event, "state_key"):
|
if hasattr(event, "state_key"):
|
||||||
# Get previous state
|
# Get previous state
|
||||||
if hasattr(event, "prev_state") and event.prev_state:
|
if hasattr(event, "replaces_state") and event.replaces_state:
|
||||||
prev_event = yield self.store.get_event(event.prev_state)
|
prev_event = yield self.store.get_event(
|
||||||
|
event.replaces_state
|
||||||
|
)
|
||||||
results[(event.type, event.state_key)] = prev_event
|
results[(event.type, event.state_key)] = prev_event
|
||||||
else:
|
else:
|
||||||
del results[(event.type, event.state_key)]
|
del results[(event.type, event.state_key)]
|
||||||
|
|
Loading…
Reference in a new issue