Context consistency and fetch reply user

This commit is contained in:
Cynthia Foxwell 2025-04-04 14:14:04 -06:00
parent 38f2ede5c0
commit d985bbcf5c
No known key found for this signature in database

View File

@ -110,13 +110,15 @@ proc createStatusRouter*(cfg: Config) =
quote = get(tweet.quote)
quoteUser = quote.user
if tweet.replyId != 0:
context = &"↩ Replying to: @{tweet.replyHandle}\n↘ Quoting: {quoteUser.fullname} (@{quoteUser.username})"
let replyUser = await getGraphUser(tweet.replyHandle)
context = &"↩ {replyUser.fullname} (@{tweet.replyHandle})\n↘ {quoteUser.fullname} (@{quoteUser.username})"
contextUrl = &"{getUrlPrefix(cfg)}/i/status/{tweet.replyId}"
else:
context = &"Quoting: {quoteUser.fullname} (@{quoteUser.username})"
context = &"{quoteUser.fullname} (@{quoteUser.username})"
contextUrl = &"{getUrlPrefix(cfg)}/i/status/{quote.id}"
elif tweet.replyId != 0:
context = &"↩ Replying to: @{tweet.replyHandle}"
let replyUser = await getGraphUser(tweet.replyHandle)
context = &"↩ {replyUser.fullname} (@{tweet.replyHandle})"
contextUrl = &"{getUrlPrefix(cfg)}/i/status/{tweet.replyId}"
if tweet.video.isSome():