Forráskód Böngészése

Fix incorrect log about not persisting duplicate state event. (#4776)

We were logging this when it was not true.
Richard van der Hoff 5 éve
szülő
commit
3064952939
2 módosított fájl, 5 hozzáadás és 3 törlés
  1. 1 0
      changelog.d/4776.bugfix
  2. 4 3
      synapse/handlers/message.py

+ 1 - 0
changelog.d/4776.bugfix

@@ -0,0 +1 @@
+Fix incorrect log about not persisting duplicate state event.

+ 4 - 3
synapse/handlers/message.py

@@ -436,10 +436,11 @@ class EventCreationHandler(object):
 
         if event.is_state():
             prev_state = yield self.deduplicate_state_event(event, context)
-            logger.info(
-                "Not bothering to persist duplicate state event %s", event.event_id,
-            )
             if prev_state is not None:
+                logger.info(
+                    "Not bothering to persist state event %s duplicated by %s",
+                    event.event_id, prev_state.event_id,
+                )
                 defer.returnValue(prev_state)
 
         yield self.handle_new_client_event(