We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
state_after_event
1 parent 8c84264 commit 32d1d1cCopy full SHA for 32d1d1c
1 file changed
synapse/visibility.py
@@ -196,10 +196,13 @@ def allowed(event: EventBase) -> EventBase | None:
196
# Filter out call invites in public rooms, as this would potentially
197
# ring a lot of users.
198
if (
199
- state_after_event is not None
+ event.type == EventTypes.CallInvite
200
and not event.is_state()
201
- and event.type == EventTypes.CallInvite
202
):
+ # `state_after_event` should only be None if the event is an outlier,
203
+ # and call invites should not be outliers.
204
+ assert state_after_event is not None
205
+
206
room_join_rules = state_after_event.get((EventTypes.JoinRules, ""))
207
208
room_join_rules is not None
0 commit comments