Skip to content

Commit

Permalink
Disable push processing
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Oct 6, 2022
1 parent f3eb2b2 commit 9b6a755
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion synapse/handlers/federation_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,7 @@ async def _run_push_actions_and_persist_event(
# persist_events_and_notify directly.)
assert not event.internal_metadata.outlier

if not backfilled and not context.rejected:
if False and not backfilled and not context.rejected:
min_depth = await self._store.get_min_depth(event.room_id)
if min_depth is None or min_depth > event.depth:
# XXX richvdh 2021/10/07: I don't really understand what this
Expand Down
23 changes: 12 additions & 11 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,17 +1425,18 @@ async def _persist_events(
a room that has been un-partial stated.
"""

for event, context in events_and_context:
# Skip push notification actions for historical messages
# because we don't want to notify people about old history back in time.
# The historical messages also do not have the proper `context.current_state_ids`
# and `state_groups` because they have `prev_events` that aren't persisted yet
# (historical messages persisted in reverse-chronological order).
if not event.internal_metadata.is_historical():
with opentracing.start_active_span("calculate_push_actions"):
await self._bulk_push_rule_evaluator.action_for_event_by_user(
event, context
)
# T2B: Disable push processing.
#for event, context in events_and_context:
# # Skip push notification actions for historical messages
# # because we don't want to notify people about old history back in time.
# # The historical messages also do not have the proper `context.current_state_ids`
# # and `state_groups` because they have `prev_events` that aren't persisted yet
# # (historical messages persisted in reverse-chronological order).
# if not event.internal_metadata.is_historical():
# with opentracing.start_active_span("calculate_push_actions"):
# await self._bulk_push_rule_evaluator.action_for_event_by_user(
# event, context
# )

try:
# If we're a worker we need to hit out to the master.
Expand Down

0 comments on commit 9b6a755

Please sign in to comment.