Skip to content

Commit

Permalink
Add external URL to caption for unsupported XMA types
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed May 23, 2024
1 parent 32f0528 commit 7222899
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion msgconv/from-meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,9 @@ func (mc *MessageConverter) xmaAttachmentToMatrix(ctx context.Context, att *tabl
}
_, hasExternalURL := converted.Extra["external_url"]
if !hasExternalURL && att.CTA != nil && att.CTA.ActionUrl != "" {
converted.Extra["external_url"] = removeLPHP(att.CTA.ActionUrl)
externalURL := removeLPHP(att.CTA.ActionUrl)
converted.Extra["external_url"] = externalURL
addExternalURLCaption(converted.Content, externalURL)
}
parts := []*ConvertedMessagePart{converted}
if att.TitleText != "" || att.CaptionBodyText != "" {
Expand Down

0 comments on commit 7222899

Please sign in to comment.