This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
user_left_room
distributor signal is unreliable
#13673
Labels
A-Device-List-Tracking
Telling clients about other devices. Often related to E2EE.
A-Membership
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Tolerable
Minor significance, cosmetic issues, low or no impact to users.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
In Synapse, there is a class called
Distributor
, which maintains a list of callbacks for a named signal and calls them all when the signal is fired: https://github.com/matrix-org/synapse/blob/develop/synapse/util/distributor.py#L43There's only one signal defined currently and it's
user_left_room
, which is used in two places:DeviceHandler
, to mark a remote user's device list as unsubscribedsynapse/synapse/handlers/device.py
Lines 569 to 575 in 1a209ef
TypingWriterHandler
, to stop a user's typing indicator when they leave a room.synapse/synapse/handlers/typing.py
Lines 311 to 315 in 1a209ef
Unfortunately, the
user_left_room
signal is currently only reliable when local users leave a room normally (and not via a ban!).This manifested as #13651 for device lists. Once #13651 is fixed, device list tracking will no longer use the signal.
We should look into whether the typing listener is necessary and if it can be moved elsewhere, so that we can eliminate this bit of architecture that's only used by one tiny part of synapse.
The text was updated successfully, but these errors were encountered: