mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Merge pull request #495 from matrix-org/erikj/disable_notification
Temporarily disable notification branch
This commit is contained in:
commit
939cbd7057
@ -36,7 +36,7 @@ from synapse.events.utils import prune_event
|
|||||||
|
|
||||||
from synapse.util.retryutils import NotRetryingDestination
|
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
|
from twisted.internet import defer
|
||||||
|
|
||||||
@ -244,11 +244,12 @@ class FederationHandler(BaseHandler):
|
|||||||
user = UserID.from_string(event.state_key)
|
user = UserID.from_string(event.state_key)
|
||||||
yield user_joined_room(self.distributor, user, event.room_id)
|
yield user_joined_room(self.distributor, user, event.room_id)
|
||||||
|
|
||||||
if not backfilled and not event.internal_metadata.is_outlier():
|
# Temporarily disable notifications due to performance concerns.
|
||||||
action_generator = ActionGenerator(self.store)
|
# if not backfilled and not event.internal_metadata.is_outlier():
|
||||||
yield action_generator.handle_push_actions_for_event(
|
# action_generator = ActionGenerator(self.store)
|
||||||
event, self
|
# yield action_generator.handle_push_actions_for_event(
|
||||||
)
|
# event, self
|
||||||
|
# )
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _filter_events_for_server(self, server_name, room_id, events):
|
def _filter_events_for_server(self, server_name, room_id, events):
|
||||||
|
@ -841,6 +841,9 @@ class SyncHandler(BaseHandler):
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def unread_notifs_for_room_id(self, room_id, sync_config, ephemeral_by_room):
|
def unread_notifs_for_room_id(self, room_id, sync_config, ephemeral_by_room):
|
||||||
|
# Temporarily disable notifications due to performance concerns.
|
||||||
|
defer.returnValue([])
|
||||||
|
|
||||||
last_unread_event_id = self.last_read_event_id_for_room_and_user(
|
last_unread_event_id = self.last_read_event_id_for_room_and_user(
|
||||||
room_id, sync_config.user.to_string(), ephemeral_by_room
|
room_id, sync_config.user.to_string(), ephemeral_by_room
|
||||||
)
|
)
|
||||||
|
@ -36,6 +36,9 @@ class ActionGenerator:
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def handle_push_actions_for_event(self, event, handler):
|
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:
|
if event.type == EventTypes.Redaction and event.redacts is not None:
|
||||||
yield self.store.remove_push_actions_for_event_id(
|
yield self.store.remove_push_actions_for_event_id(
|
||||||
event.room_id, event.redacts
|
event.room_id, event.redacts
|
||||||
|
Loading…
Reference in New Issue
Block a user