This commit is contained in:
Cynthia Foxwell 2025-03-23 19:59:42 +00:00
parent 0d9ffa6aa2
commit 1a520f5792
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -12,13 +12,13 @@ proc formatTweetForMastoAPI*(tweet: Tweet, cfg: Config, prefs: Prefs): string =
quoteUrl = &"{getUrlPrefix(cfg)}/i/status/{quote.id}" quoteUrl = &"{getUrlPrefix(cfg)}/i/status/{quote.id}"
content &= &"\n\n<blockquote><b>↘ <a href=\"{quoteUrl}\">{quote.user.fullName} (@{quote.user.username})</a></b>\n{quoteContent}" content &= &"\n\n<blockquote><b>↘ <a href=\"{quoteUrl}\">{quote.user.fullName} (@{quote.user.username})</a></b>\n{quoteContent}"
if quote.video.isSome() or tweet.gif.isSome(): if quote.video.isSome() or quote.gif.isSome():
content &= "\n📹" content &= "\n📹"
if tweet.gif.isSome(): if quote.gif.isSome():
content &= " (GIF)" content &= " (GIF)"
elif tweet.photos.len > 0: elif quote.photos.len > 0:
content &= "\n🖼️" content &= "\n🖼️"
if tweet.photos.len > 1: if quote.photos.len > 1:
content &= &" ({tweet.photos.len})" content &= &" ({tweet.photos.len})"
content &= "</blockquote>" content &= "</blockquote>"