mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 09:40:22 +00:00
Move to after we know not None
This commit is contained in:
parent
eb2ac3f4cc
commit
eaf8bab089
1 changed files with 7 additions and 8 deletions
|
@ -139,14 +139,6 @@ class ApplicationServiceScheduler:
|
||||||
to refresh the device lists of, or those that the application service need no
|
to refresh the device lists of, or those that the application service need no
|
||||||
longer track the device lists of.
|
longer track the device lists of.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# 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)]
|
|
||||||
|
|
||||||
# We purposefully allow this method to run with empty events/ephemeral
|
# We purposefully allow this method to run with empty events/ephemeral
|
||||||
# collections, so that callers do not need to check iterable size themselves.
|
# collections, so that callers do not need to check iterable size themselves.
|
||||||
if (
|
if (
|
||||||
|
@ -157,6 +149,13 @@ class ApplicationServiceScheduler:
|
||||||
):
|
):
|
||||||
return
|
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:
|
if events:
|
||||||
self.queuer.queued_events.setdefault(appservice.id, []).extend(events)
|
self.queuer.queued_events.setdefault(appservice.id, []).extend(events)
|
||||||
if ephemeral:
|
if ephemeral:
|
||||||
|
|
Loading…
Reference in a new issue