Skip to content

Commit 4ab280d

Browse files
committed
Disable push processing
1 parent 5f301ad commit 4ab280d

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

synapse/handlers/federation_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ async def _run_push_actions_and_persist_event(
21012101
# persist_events_and_notify directly.)
21022102
assert not event.internal_metadata.outlier
21032103

2104-
if not backfilled and not context.rejected:
2104+
if False and not backfilled and not context.rejected:
21052105
min_depth = await self._store.get_min_depth(event.room_id)
21062106
if min_depth is None or min_depth > event.depth:
21072107
# XXX richvdh 2021/10/07: I don't really understand what this

synapse/handlers/message.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,17 +1425,18 @@ async def _persist_events(
14251425
a room that has been un-partial stated.
14261426
"""
14271427

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

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

0 commit comments

Comments
 (0)