mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:56:05 -04:00
Give guest users a device_id
We need to create devices for guests so that they can use e2e, but we don't have anywhere to store it, so just use a fixed one.
This commit is contained in:
parent
d4a459f7cb
commit
7f02e4d008
2 changed files with 20 additions and 5 deletions
|
@ -39,6 +39,9 @@ AuthEventTypes = (
|
|||
EventTypes.ThirdPartyInvite,
|
||||
)
|
||||
|
||||
# guests always get this device id.
|
||||
GUEST_DEVICE_ID = "guest_device"
|
||||
|
||||
|
||||
class Auth(object):
|
||||
"""
|
||||
|
@ -728,7 +731,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue