Fix merged captions in backfill

This commit is contained in:
Tulir Asokan 2022-09-28 16:43:27 +03:00
parent 7a933124fa
commit ea8c58b4f5

View file

@ -643,13 +643,13 @@ func (portal *Portal) requestMediaRetries(source *User, eventIDs []id.EventID, i
} }
func (portal *Portal) appendBatchEvents(source *User, converted *ConvertedMessage, info *types.MessageInfo, raw *waProto.WebMessageInfo, eventsArray *[]*event.Event, infoArray *[]*wrappedInfo) error { func (portal *Portal) appendBatchEvents(source *User, converted *ConvertedMessage, info *types.MessageInfo, raw *waProto.WebMessageInfo, eventsArray *[]*event.Event, infoArray *[]*wrappedInfo) error {
if portal.bridge.Config.Bridge.CaptionInMessage {
converted.MergeCaption()
}
mainEvt, err := portal.wrapBatchEvent(info, converted.Intent, converted.Type, converted.Content, converted.Extra, "") mainEvt, err := portal.wrapBatchEvent(info, converted.Intent, converted.Type, converted.Content, converted.Extra, "")
if err != nil { if err != nil {
return err return err
} }
if portal.bridge.Config.Bridge.CaptionInMessage {
converted.MergeCaption()
}
expirationStart := raw.GetEphemeralStartTimestamp() expirationStart := raw.GetEphemeralStartTimestamp()
mainInfo := &wrappedInfo{ mainInfo := &wrappedInfo{
MessageInfo: info, MessageInfo: info,