mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
Invert condition
This commit is contained in:
parent
1d517e0bb9
commit
eb5abbd96a
|
|
@ -177,7 +177,11 @@ func fillDisplayName(
|
|||
}
|
||||
}
|
||||
|
||||
if thirdPartyInviteEvent != nil {
|
||||
if thirdPartyInviteEvent == nil {
|
||||
// If the third party invite event doesn't exist then we can't use it to set the display name.
|
||||
return nil
|
||||
}
|
||||
|
||||
var thirdPartyInviteContent common.ThirdPartyInviteContent
|
||||
if err := json.Unmarshal(thirdPartyInviteEvent.Content(), &thirdPartyInviteContent); err != nil {
|
||||
return err
|
||||
|
|
@ -189,7 +193,6 @@ func fillDisplayName(
|
|||
if err := builder.SetContent(content); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue