mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 05:36:05 +00:00
Add commentary for fix in PR#442
This commit is contained in:
parent
15e9885197
commit
28c5181dfe
@ -356,6 +356,12 @@ class SyncRestServlet(RestServlet):
|
|||||||
|
|
||||||
prev_content = timeline_event.unsigned.get('prev_content')
|
prev_content = timeline_event.unsigned.get('prev_content')
|
||||||
prev_sender = timeline_event.unsigned.get('prev_sender')
|
prev_sender = timeline_event.unsigned.get('prev_sender')
|
||||||
|
# Empircally it seems possible for the event to have a
|
||||||
|
# "replaces_state" key but not a prev_content or prev_sender
|
||||||
|
# markjh conjectures that it could be due to the server not
|
||||||
|
# having a copy of that event.
|
||||||
|
# If this is the case the we ignore the previous event. This will
|
||||||
|
# cause the displayname calculations on the client to be incorrect
|
||||||
if prev_event_id is None or not prev_content or not prev_sender:
|
if prev_event_id is None or not prev_content or not prev_sender:
|
||||||
del result[event_key]
|
del result[event_key]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user