🐛 Fix repost to & reply to content did not got truncated

This commit is contained in:
LittleSheep 2024-12-25 22:35:31 +08:00
parent 1a3e43a12f
commit 19e1b5f7c6

View File

@ -575,6 +575,13 @@ func TruncatePostContent(post models.Post) models.Post {
}
}
if post.RepostTo != nil {
post.RepostTo = lo.ToPtr(TruncatePostContent(*post.RepostTo))
}
if post.ReplyTo != nil {
post.ReplyTo = lo.ToPtr(TruncatePostContent(*post.ReplyTo))
}
return post
}