summary refs log tree commit diff
path: root/tests/rest/client
diff options
context:
space:
mode:
authordevonh <devon.dmytro@gmail.com>2024-05-21 20:09:17 +0000
committerGitHub <noreply@github.com>2024-05-21 20:09:17 +0000
commit6a9a641fb86b04587840bcb6b76af9a0acef9b54 (patch)
treea8c0bace62f61de7b605c23635d85d111abf11d9 /tests/rest/client
parentImprove perf of sync device lists (#17216) (diff)
downloadsynapse-6a9a641fb86b04587840bcb6b76af9a0acef9b54.tar.xz
Bring auto-accept invite logic into Synapse (#17147)
This PR ports the logic from the
[synapse_auto_accept_invite](https://github.com/matrix-org/synapse-auto-accept-invite)
module into synapse.

I went with the naive approach of injecting the "module" next to where
third party modules are currently loaded. If there is a better/preferred
way to handle this, I'm all ears. It wasn't obvious to me if there was a
better location to add this logic that would cleanly apply to all
incoming invite events.

Relies on https://github.com/element-hq/synapse/pull/17166 to fix linter
errors.
Diffstat (limited to 'tests/rest/client')
-rw-r--r--tests/rest/client/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/rest/client/utils.py b/tests/rest/client/utils.py
index fe00afe198..7362bde7ab 100644
--- a/tests/rest/client/utils.py
+++ b/tests/rest/client/utils.py
@@ -170,6 +170,7 @@ class RestHelper:
         targ: Optional[str] = None,
         expect_code: int = HTTPStatus.OK,
         tok: Optional[str] = None,
+        extra_data: Optional[dict] = None,
     ) -> JsonDict:
         return self.change_membership(
             room=room,
@@ -178,6 +179,7 @@ class RestHelper:
             tok=tok,
             membership=Membership.INVITE,
             expect_code=expect_code,
+            extra_data=extra_data,
         )
 
     def join(