summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-08-20 15:07:42 -0400
committerGitHub <noreply@github.com>2020-08-20 15:07:42 -0400
commite259d63f73fd7599520d0c4a6f5082e5cd383d25 (patch)
tree1d81842222fc60c9ed4258151362d1c872c1bab9 /synapse/api/errors.py
parentBe more tolerant of membership events in unknown rooms (#8110) (diff)
downloadsynapse-e259d63f73fd7599520d0c4a6f5082e5cd383d25.tar.xz
Stop shadow-banned users from sending invites. (#8095)
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index a3f314118a..4888c0ec4d 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -604,3 +604,11 @@ class HttpResponseException(CodeMessageException):
         errmsg = j.pop("error", self.msg)
 
         return ProxiedRequestError(self.code, errmsg, errcode, j)
+
+
+class ShadowBanError(Exception):
+    """
+    Raised when a shadow-banned user attempts to perform an action.
+
+    This should be caught and a proper "fake" success response sent to the user.
+    """