forked from Mirrors/gomuks
hicli/send: fix panic if history visibility event is not found
This commit is contained in:
parent
6425f68c88
commit
678940618f
1 changed files with 3 additions and 0 deletions
|
@ -516,6 +516,9 @@ func (h *HiClient) shouldShareKeysToInvitedUsers(ctx context.Context, roomID id.
|
|||
if err != nil {
|
||||
zerolog.Ctx(ctx).Err(err).Msg("Failed to get history visibility event")
|
||||
return false
|
||||
} else if historyVisibility == nil {
|
||||
zerolog.Ctx(ctx).Warn().Msg("History visibility event not found")
|
||||
return false
|
||||
}
|
||||
mautrixEvt := historyVisibility.AsRawMautrix()
|
||||
err = mautrixEvt.Content.ParseRaw(mautrixEvt.Type)
|
||||
|
|
Loading…
Add table
Reference in a new issue