This bit of code filters out call invite events in public rooms to prevent someone from being able to ring hundreds of people by sending a call event:
|
loaded_recents = [] |
|
for event in filtered_recents: |
|
if event.type == EventTypes.CallInvite: |
|
room_info = await self.store.get_room_with_stats(event.room_id) |
|
assert room_info is not None |
|
if room_info.join_rules == JoinRules.PUBLIC: |
|
continue |
|
loaded_recents.append(event) |
@MadLittleMods asks whether it can be moved to filter_events_for_client rather than its current spot in _load_filtered_recents, so that the new native sliding sync implementation can utilise it (#16908 (comment)). Another alternative is to soft_fail the call invites.
This bit of code filters out call invite events in public rooms to prevent someone from being able to ring hundreds of people by sending a call event:
synapse/synapse/handlers/sync.py
Lines 934 to 941 in a023538
@MadLittleMods asks whether it can be moved to
filter_events_for_clientrather than its current spot in_load_filtered_recents, so that the new native sliding sync implementation can utilise it (#16908 (comment)). Another alternative is tosoft_failthe call invites.