diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2016-11-29 17:41:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-29 17:41:35 +0000 |
commit | 77eca2487c54cf7ba4c6dc73ef5f44930918a763 (patch) | |
tree | 316acc1506e13de576c9d09cfd5c0b00df15b159 /synapse/api/auth.py | |
parent | Merge pull request #1657 from matrix-org/rav/hurry_up_pip (diff) | |
parent | Allow guest access to endpoints for E2E (diff) | |
download | synapse-77eca2487c54cf7ba4c6dc73ef5f44930918a763.tar.xz |
Merge pull request #1653 from matrix-org/rav/guest_e2e
Implement E2E for guests
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 1ab27da941..dbfabc70b1 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -39,6 +39,9 @@ AuthEventTypes = ( EventTypes.ThirdPartyInvite, ) +# guests always get this device id. +GUEST_DEVICE_ID = "guest_device" + class Auth(object): """ @@ -717,7 +720,8 @@ class Auth(object): "user": user, "is_guest": True, "token_id": None, - "device_id": None, + # all guests get the same device id + "device_id": GUEST_DEVICE_ID, } elif rights == "delete_pusher": # We don't store these tokens in the database |