summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorŠimon Brandner <simon.bra.ag@gmail.com>2022-06-29 19:12:45 +0200
committerGitHub <noreply@github.com>2022-06-29 17:12:45 +0000
commit13e359aec8ae8be8dc56a036ae6d9f2bc1d07385 (patch)
tree89e74b3899b5e488e0937876f071f7a7e9375cdd /synapse/api
parentFix documentation header for `allow_public_rooms_over_federation` (#13116) (diff)
downloadsynapse-13e359aec8ae8be8dc56a036ae6d9f2bc1d07385.tar.xz
Implement MSC3827: Filtering of `/publicRooms` by room type (#13031)
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/constants.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/api/constants.py b/synapse/api/constants.py
index e1d31cabed..2653764119 100644
--- a/synapse/api/constants.py
+++ b/synapse/api/constants.py
@@ -259,3 +259,13 @@ class ReceiptTypes:
     READ: Final = "m.read"
     READ_PRIVATE: Final = "org.matrix.msc2285.read.private"
     FULLY_READ: Final = "m.fully_read"
+
+
+class PublicRoomsFilterFields:
+    """Fields in the search filter for `/publicRooms` that we understand.
+
+    As defined in https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3publicrooms
+    """
+
+    GENERIC_SEARCH_TERM: Final = "generic_search_term"
+    ROOM_TYPES: Final = "org.matrix.msc3827.room_types"