Compare commits

...

7 Commits

Author SHA1 Message Date
Eric Eastwood
13f6c6d115 Protect both times 2022-12-24 02:44:39 -06:00
Eric Eastwood
fa8e029bfc move it again 2022-12-23 14:47:16 -06:00
Eric Eastwood
ea0489ba13 Move to after we know not None 2022-12-23 14:20:06 -06:00
Eric Eastwood
0f2dda20b2 Add more/better comments 2022-12-23 14:00:54 -06:00
Eric Eastwood
018396a8a4 Correct filtering 2022-12-23 13:50:51 -06:00
Eric Eastwood
d1f258ff95 Add dummy changelog 2022-12-23 13:50:10 -06:00
Eric Eastwood
36d1547996 Ignore events from ourself 2022-12-23 13:46:04 -06:00
2 changed files with 12 additions and 0 deletions

1
changelog.d/14729.misc Normal file
View File

@@ -0,0 +1 @@
Don't merge this.

View File

@@ -98,6 +98,7 @@ class ApplicationServiceScheduler:
"""
def __init__(self, hs: "HomeServer"):
self._hs = hs
self.clock = hs.get_clock()
self.store = hs.get_datastores().main
self.as_api = hs.get_application_service_api()
@@ -148,6 +149,16 @@ class ApplicationServiceScheduler:
):
return
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)
]
if events:
self.queuer.queued_events.setdefault(appservice.id, []).extend(events)
if ephemeral: