summary refs log tree commit diff
path: root/synapse/event_auth.py
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2021-09-21 15:06:28 -0500
committerGitHub <noreply@github.com>2021-09-21 15:06:28 -0500
commit51e2db35983953b13e536331ec2f6ad4cae7e0f1 (patch)
tree823c37f186796e8cb2b5beada4fb351477481770 /synapse/event_auth.py
parentAdd type hints for event streams. (#10856) (diff)
downloadsynapse-51e2db35983953b13e536331ec2f6ad4cae7e0f1.tar.xz
Rename MSC2716 things from `chunk` to `batch` to match `/batch_send` endpoint (#10838)
See https://github.com/matrix-org/matrix-doc/pull/2716#discussion_r684574497

Dropping support for older MSC2716 room versions so we don't have to worry about
supporting both chunk and batch events.
Diffstat (limited to 'synapse/event_auth.py')
-rw-r--r--synapse/event_auth.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/event_auth.py b/synapse/event_auth.py
index cb133f3f84..fc50a0e71a 100644
--- a/synapse/event_auth.py
+++ b/synapse/event_auth.py
@@ -213,7 +213,7 @@ def check(
 
     if (
         event.type == EventTypes.MSC2716_INSERTION
-        or event.type == EventTypes.MSC2716_CHUNK
+        or event.type == EventTypes.MSC2716_BATCH
         or event.type == EventTypes.MSC2716_MARKER
     ):
         check_historical(room_version_obj, event, auth_events)
@@ -552,14 +552,14 @@ def check_historical(
     auth_events: StateMap[EventBase],
 ) -> None:
     """Check whether the event sender is allowed to send historical related
-    events like "insertion", "chunk", and "marker".
+    events like "insertion", "batch", and "marker".
 
     Returns:
         None
 
     Raises:
         AuthError if the event sender is not allowed to send historical related events
-        ("insertion", "chunk", and "marker").
+        ("insertion", "batch", and "marker").
     """
     # Ignore the auth checks in room versions that do not support historical
     # events
@@ -573,7 +573,7 @@ def check_historical(
     if user_level < historical_level:
         raise AuthError(
             403,
-            'You don\'t have permission to send send historical related events ("insertion", "chunk", and "marker")',
+            'You don\'t have permission to send send historical related events ("insertion", "batch", and "marker")',
         )