Browse Source

Fix merged captions in backfill

Tulir Asokan 2 years ago
parent
commit
ea8c58b4f5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      historysync.go

+ 3 - 3
historysync.go

@@ -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 {
+	if portal.bridge.Config.Bridge.CaptionInMessage {
+		converted.MergeCaption()
+	}
 	mainEvt, err := portal.wrapBatchEvent(info, converted.Intent, converted.Type, converted.Content, converted.Extra, "")
 	if err != nil {
 		return err
 	}
-	if portal.bridge.Config.Bridge.CaptionInMessage {
-		converted.MergeCaption()
-	}
 	expirationStart := raw.GetEphemeralStartTimestamp()
 	mainInfo := &wrappedInfo{
 		MessageInfo:     info,