Fix panic if converted message has no parts
This commit is contained in:
parent
25d53248e2
commit
15015f280e
1 changed files with 1 additions and 1 deletions
|
@ -1025,7 +1025,7 @@ func (portal *Portal) convertGoogleMessage(ctx context.Context, source *User, ev
|
||||||
if portal.bridge.Config.Bridge.CaptionInMessage {
|
if portal.bridge.Config.Bridge.CaptionInMessage {
|
||||||
cm.MergeCaption()
|
cm.MergeCaption()
|
||||||
}
|
}
|
||||||
if raw != nil && base64.StdEncoding.EncodedLen(len(raw)) < 8192 {
|
if raw != nil && base64.StdEncoding.EncodedLen(len(raw)) < 8192 && len(cm.Parts) > 0 {
|
||||||
extra := cm.Parts[0].Extra
|
extra := cm.Parts[0].Extra
|
||||||
if extra == nil {
|
if extra == nil {
|
||||||
extra = make(map[string]any)
|
extra = make(map[string]any)
|
||||||
|
|
Loading…
Reference in a new issue