From 2ae2a04616a627eabbf3ca69700462a52f344e69 Mon Sep 17 00:00:00 2001
From: Patrick Cloke <clokep@users.noreply.github.com>
Date: Wed, 11 Aug 2021 14:31:39 -0400
Subject: [PATCH] Clarify error message when joining a restricted room.
 (#10572)

---
 changelog.d/10572.misc         | 1 +
 synapse/handlers/event_auth.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 changelog.d/10572.misc

diff --git a/changelog.d/10572.misc b/changelog.d/10572.misc
new file mode 100644
index 0000000000..008d7be444
--- /dev/null
+++ b/changelog.d/10572.misc
@@ -0,0 +1 @@
+Clarify error message when failing to join a restricted room.
diff --git a/synapse/handlers/event_auth.py b/synapse/handlers/event_auth.py
index e2410e482f..4288ffff09 100644
--- a/synapse/handlers/event_auth.py
+++ b/synapse/handlers/event_auth.py
@@ -213,7 +213,7 @@ class EventAuthHandler:
 
             raise AuthError(
                 403,
-                "You do not belong to any of the required rooms to join this room.",
+                "You do not belong to any of the required rooms/spaces to join this room.",
             )
 
     async def has_restricted_join_rules(
-- 
GitLab