mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 17:50:21 +00:00
Ignore events from ourself
This commit is contained in:
parent
1a4bc25c59
commit
22f3f54eb3
1 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||
|
@ -138,6 +139,11 @@ class ApplicationServiceScheduler:
|
|||
to refresh the device lists of, or those that the application service need no
|
||||
longer track the device lists of.
|
||||
"""
|
||||
|
||||
# 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 self._hs.is_mine_id(event.sender)]
|
||||
|
||||
# We purposefully allow this method to run with empty events/ephemeral
|
||||
# collections, so that callers do not need to check iterable size themselves.
|
||||
if (
|
||||
|
|
Loading…
Reference in a new issue