summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-01-06 11:38:09 +0000
committerDavid Baker <dave@matrix.org>2016-01-06 11:38:09 +0000
commitc79f221192044203b9d32cfbd416a7fefeb34cd5 (patch)
tree4465211af0ca7add866429dcb224017bb5d9962c /synapse/rest/client/v2_alpha
parentMerge remote-tracking branch 'origin/develop' into store_event_actions (diff)
downloadsynapse-c79f221192044203b9d32cfbd416a7fefeb34cd5.tar.xz
Add is_guest flag to users db to track whether a user is a guest user or not. Use this so we can run _filter_events_for_client when calculating event_push_actions.
Diffstat (limited to 'synapse/rest/client/v2_alpha')
-rw-r--r--synapse/rest/client/v2_alpha/register.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py
index 25389ceded..c4d025b465 100644
--- a/synapse/rest/client/v2_alpha/register.py
+++ b/synapse/rest/client/v2_alpha/register.py
@@ -259,7 +259,10 @@ class RegisterRestServlet(RestServlet):
     def _do_guest_registration(self):
         if not self.hs.config.allow_guest_access:
             defer.returnValue((403, "Guest access is disabled"))
-        user_id, _ = yield self.registration_handler.register(generate_token=False)
+        user_id, _ = yield self.registration_handler.register(
+            generate_token=False,
+            make_guest=True
+        )
         access_token = self.auth_handler.generate_access_token(user_id, ["guest = true"])
         defer.returnValue((200, {
             "user_id": user_id,