summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-13 17:37:09 +0000
committerErik Johnston <erik@matrix.org>2016-01-13 17:39:58 +0000
commitfcb05b4c8269ac7cb2e153e0a68c040a965d8279 (patch)
treefe6b582fdd8fc10184cc44b55a8e20698509191d
parentMerge pull request #488 from matrix-org/markjh/user_name (diff)
downloadsynapse-fcb05b4c8269ac7cb2e153e0a68c040a965d8279.tar.xz
Temporarily disable notification branch
-rw-r--r--synapse/handlers/federation.py13
-rw-r--r--synapse/handlers/sync.py5
-rw-r--r--synapse/push/action_generator.py3
3 files changed, 14 insertions, 7 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 5dee24e21d..2f6359c768 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -36,7 +36,7 @@ from synapse.events.utils import prune_event
 
 from synapse.util.retryutils import NotRetryingDestination
 
-from synapse.push.action_generator import ActionGenerator
+# from synapse.push.action_generator import ActionGenerator
 
 from twisted.internet import defer
 
@@ -244,11 +244,12 @@ class FederationHandler(BaseHandler):
                     user = UserID.from_string(event.state_key)
                     yield user_joined_room(self.distributor, user, event.room_id)
 
-        if not backfilled and not event.internal_metadata.is_outlier():
-            action_generator = ActionGenerator(self.store)
-            yield action_generator.handle_push_actions_for_event(
-                event, self
-            )
+        # Temporarily disable notifications due to performance concerns.
+        # if not backfilled and not event.internal_metadata.is_outlier():
+        #     action_generator = ActionGenerator(self.store)
+        #     yield action_generator.handle_push_actions_for_event(
+        #         event, self
+        #     )
 
     @defer.inlineCallbacks
     def _filter_events_for_server(self, server_name, room_id, events):
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index 33c1a4512c..69707c47ed 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -840,7 +840,10 @@ class SyncHandler(BaseHandler):
         return False
 
     @defer.inlineCallbacks
-    def unread_notifs_for_room_id(self, room_id, sync_config, ephemeral_by_room):
+    def unreadnotifs_for_room_id(self, room_id, sync_config, ephemeral_by_room):
+        # Temporarily disable notifications due to performance concerns.
+        return
+
         last_unread_event_id = self.last_read_event_id_for_room_and_user(
             room_id, sync_config.user.to_string(), ephemeral_by_room
         )
diff --git a/synapse/push/action_generator.py b/synapse/push/action_generator.py
index 4cf94f6c61..73467f3adc 100644
--- a/synapse/push/action_generator.py
+++ b/synapse/push/action_generator.py
@@ -36,6 +36,9 @@ class ActionGenerator:
 
     @defer.inlineCallbacks
     def handle_push_actions_for_event(self, event, handler):
+        # Temporarily disable notifications due to performance concerns.
+        return
+
         if event.type == EventTypes.Redaction and event.redacts is not None:
             yield self.store.remove_push_actions_for_event_id(
                 event.room_id, event.redacts