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

Add a configuration to exclude rooms from sync response #12310

Merged
merged 11 commits into from
Mar 30, 2022
Prev Previous commit
Next Next commit
Lint
  • Loading branch information
babolivier committed Mar 28, 2022
commit c360f652d8f0875f4145a8cf4397af50d67a7ec6
6 changes: 6 additions & 0 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,12 @@ templates:
#
#custom_template_directory: /path/to/custom/templates/

# List of rooms to exclude from sync responses.
# No room is excluded by default.
#
#exclude_rooms_from_sync:
# - !foo:example.com


# Message retention policy at the server level.
#
Expand Down
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"""

import logging
from typing import TYPE_CHECKING, Collection, Dict, List, Optional, Set, Tuple
from typing import TYPE_CHECKING, Any, Collection, Dict, List, Optional, Set, Tuple

import attr
from frozendict import frozendict
Expand Down Expand Up @@ -614,7 +614,7 @@ def f(txn: LoggingTransaction) -> List[_EventDictReturn]:
min_from_id = from_key.stream
max_to_id = to_key.get_max_stream_pos()

args = [user_id, min_from_id, max_to_id]
args: List[Any] = [user_id, min_from_id, max_to_id]

ignore_room_clause = ""
if ignored_rooms is not None:
Expand Down