summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2022-12-23 14:47:16 -0600
committerJason Robinson <jasonr@element.io>2022-12-24 10:43:14 +0200
commit89422ac9ffb904c810fc63bbcb940bce41c0ba0e (patch)
tree5c3eba6ba2674977cacbe971f00bde8938d670bd
parentMove to after we know not None (diff)
downloadsynapse-github/jaywink/gitter.tar.xz
-rw-r--r--synapse/appservice/scheduler.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/synapse/appservice/scheduler.py b/synapse/appservice/scheduler.py

index 8d17f7b777..d90d45b643 100644 --- a/synapse/appservice/scheduler.py +++ b/synapse/appservice/scheduler.py
@@ -149,14 +149,16 @@ class ApplicationServiceScheduler: ): return - # XXX: Special patch just for Gitter which we should remove after the import, - # https://github.com/matrix-org/synapse/pull/14729 - # - # Ignore events that come from our own users. We probably already know about - # them and sent them ourself. - events = [event for event in events if not self._hs.is_mine_id(event.sender)] - if events: + # XXX: Special patch just for Gitter which we should remove after the import, + # https://github.com/matrix-org/synapse/pull/14729 + # + # Ignore events that come from our own users. We probably already know about + # them and sent them ourself. + events = [ + event for event in events if not self._hs.is_mine_id(event.sender) + ] + self.queuer.queued_events.setdefault(appservice.id, []).extend(events) if ephemeral: self.queuer.queued_ephemeral.setdefault(appservice.id, []).extend(ephemeral)