mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
Improve comments.
This commit is contained in:
@@ -282,6 +282,11 @@ func GetCommentByID(commentID uint) (*model.CommentWithRefView, error) {
|
||||
replyTo = reply
|
||||
}
|
||||
|
||||
return comment.ToViewWithRef(resource, replyTo), nil
|
||||
v := comment.ToViewWithRef(resource, replyTo)
|
||||
|
||||
if v.ReplyTo != nil {
|
||||
v.ReplyTo.Content, v.ReplyTo.ContentTruncated = restrictCommentLength(v.ReplyTo.Content)
|
||||
}
|
||||
|
||||
return v, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user