Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 6a1e423

Browse files
committed
Skip federation processing for events from bridged senders
1 parent 1870259 commit 6a1e423

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

synapse/federation/sender/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,10 @@ async def handle_event(event: EventBase) -> None:
379379
logger.debug("Not sending remote-origin event %s", event)
380380
return
381381

382+
# Beeper hack: don't bother handling federation for bridged events
383+
if event.sender.startswith("@_"):
384+
return
385+
382386
# We also want to not send out-of-band membership events.
383387
#
384388
# OOB memberships are used in three (and a half) situations:

synapse/handlers/message.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,11 @@ async def cache_joined_hosts_for_event(
14301430
if not self._external_cache.is_enabled():
14311431
return
14321432

1433+
# Beeper hack: we don't need joined hosts for bridged events because
1434+
# we don't federate them.
1435+
if event.sender.startswith("@_"):
1436+
return
1437+
14331438
# If external cache is enabled we should always have this.
14341439
assert self._external_cache_joined_hosts_updates is not None
14351440

0 commit comments

Comments
 (0)