mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 20:03:10 -06:00
Pass device_id as nil
This commit is contained in:
parent
0e74bac653
commit
7cabe39671
|
|
@ -531,9 +531,6 @@ func handleGuestRegistration(
|
|||
JSON: jsonerror.Unknown("failed to create account: " + err.Error()),
|
||||
}
|
||||
}
|
||||
//we don't allow guests to specify their own device_id
|
||||
deviceId := "guest_device"
|
||||
|
||||
token, err := tokens.GenerateLoginToken(tokens.TokenOptions{
|
||||
ServerPrivateKey: cfg.Matrix.PrivateKey.Seed(),
|
||||
ServerName: string(acc.ServerName),
|
||||
|
|
@ -546,7 +543,8 @@ func handleGuestRegistration(
|
|||
JSON: jsonerror.Unknown("Failed to generate access token"),
|
||||
}
|
||||
}
|
||||
dev, err := deviceDB.CreateDevice(req.Context(), acc.Localpart, &deviceId, token, r.InitialDisplayName)
|
||||
//we don't allow guests to specify their own device_id
|
||||
dev, err := deviceDB.CreateDevice(req.Context(), acc.Localpart, nil, token, r.InitialDisplayName)
|
||||
if err != nil {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusInternalServerError,
|
||||
|
|
|
|||
Loading…
Reference in a new issue