mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
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 {
|
if err != nil {
|
||||||
zerolog.Ctx(ctx).Err(err).Msg("Failed to get history visibility event")
|
zerolog.Ctx(ctx).Err(err).Msg("Failed to get history visibility event")
|
||||||
return false
|
return false
|
||||||
|
} else if historyVisibility == nil {
|
||||||
|
zerolog.Ctx(ctx).Warn().Msg("History visibility event not found")
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
mautrixEvt := historyVisibility.AsRawMautrix()
|
mautrixEvt := historyVisibility.AsRawMautrix()
|
||||||
err = mautrixEvt.Content.ParseRaw(mautrixEvt.Type)
|
err = mautrixEvt.Content.ParseRaw(mautrixEvt.Type)
|
||||||
|
|
Loading…
Add table
Reference in a new issue