mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 22:35:52 +01:00
bridgev2/portal: fix panic in FindPreferredLogin if receiver login doesn't exist
This commit is contained in:
parent
e3eb2953dd
commit
f56905a276
1 changed files with 1 additions and 1 deletions
|
|
@ -311,7 +311,7 @@ func (portal *Portal) FindPreferredLogin(ctx context.Context, user *User, allowR
|
|||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if login.UserMXID != user.MXID {
|
||||
if login == nil || login.UserMXID != user.MXID {
|
||||
if allowRelay && portal.Relay != nil {
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue