summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha/sync.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-12-14 14:50:51 +0000
committerMark Haines <mark.haines@matrix.org>2015-12-14 14:50:51 +0000
commit28c5181dfebbce99a4981584a5761285522ed29b (patch)
tree2b866674a906c472b229c85697ae17137c7f80bd /synapse/rest/client/v2_alpha/sync.py
parentMerge branch 'release-v0.12.0' into develop (diff)
downloadsynapse-28c5181dfebbce99a4981584a5761285522ed29b.tar.xz
Add commentary for fix in PR#442
Diffstat (limited to 'synapse/rest/client/v2_alpha/sync.py')
-rw-r--r--synapse/rest/client/v2_alpha/sync.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py
index 3f8ce701dc..adf77e13bf 100644
--- a/synapse/rest/client/v2_alpha/sync.py
+++ b/synapse/rest/client/v2_alpha/sync.py
@@ -356,6 +356,12 @@ class SyncRestServlet(RestServlet):
 
             prev_content = timeline_event.unsigned.get('prev_content')
             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:
                 del result[event_key]
             else: