mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
update m.id.user to m.id.publickey
This commit is contained in:
parent
390d557df8
commit
f995735d20
|
|
@ -155,7 +155,7 @@ func (pk LoginPublicKeyEthereum) ValidateLoginResponse() (bool, *jsonerror.Matri
|
|||
|
||||
func (pk LoginPublicKeyEthereum) CreateLogin() *Login {
|
||||
identifier := LoginIdentifier{
|
||||
Type: "m.id.user",
|
||||
Type: "m.id.publickey",
|
||||
User: pk.Address,
|
||||
}
|
||||
login := Login{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ type Login struct {
|
|||
|
||||
// Username returns the user localpart/user_id in this request, if it exists.
|
||||
func (r *Login) Username() string {
|
||||
if r.Identifier.Type == "m.id.user" {
|
||||
if r.Identifier.Type == "m.id.user" || r.Identifier.Type == "m.id.publickey" {
|
||||
return r.Identifier.User
|
||||
}
|
||||
// deprecated but without it Element iOS won't log in
|
||||
|
|
|
|||
Loading…
Reference in a new issue