summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/appservice/scheduler.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/appservice/scheduler.py b/synapse/appservice/scheduler.py
index 7b562795a3..b1029d59da 100644
--- a/synapse/appservice/scheduler.py
+++ b/synapse/appservice/scheduler.py
@@ -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 (