Username returns the user localpart/user_id in this request, if it exists.
()
| 74 | |
| 75 | // Username returns the user localpart/user_id in this request, if it exists. |
| 76 | func (r *Login) Username() string { |
| 77 | if r.Identifier.Type == "m.id.user" { |
| 78 | return r.Identifier.User |
| 79 | } |
| 80 | // deprecated but without it Element iOS won't log in |
| 81 | return r.User |
| 82 | } |
| 83 | |
| 84 | // ThirdPartyID returns the 3PID medium and address for this login, if it exists. |
| 85 | func (r *Login) ThirdPartyID() (medium, address string) { |
no outgoing calls