add login details to RegisterResponse so GUI clients show login display name

This commit is contained in:
Raal Goff 2021-10-15 23:09:55 +08:00
parent 8843188b84
commit 0603e29c46
2 changed files with 13 additions and 0 deletions

View file

@ -216,3 +216,14 @@ func (n *Namespace) toUser() *tailcfg.User {
}
return &u
}
func (n *Namespace) toLogin() *tailcfg.Login {
l := tailcfg.Login{
ID: tailcfg.LoginID(n.ID),
LoginName: n.Name,
DisplayName: n.Name,
ProfilePicURL: "",
Domain: "headscale.net",
}
return &l
}