diff --git a/modules/notification/action/action.go b/modules/notification/action/action.go index 9956940f3..a62f1e13a 100644 --- a/modules/notification/action/action.go +++ b/modules/notification/action/action.go @@ -92,13 +92,22 @@ func (a *actionNotifier) NotifyCreateIssueComment(doer *models.User, repo *model act := &models.Action{ ActUserID: doer.ID, ActUser: doer, - Content: fmt.Sprintf("%d|%s", issue.Index, comment.Content), RepoID: issue.Repo.ID, Repo: issue.Repo, Comment: comment, CommentID: comment.ID, IsPrivate: issue.Repo.IsPrivate, } + + content := "" + + if len(comment.Content) > 200 { + content = content[:strings.LastIndex(comment.Content[0:200], " ")] + "…" + } else { + content = comment.Content + } + act.Content = fmt.Sprintf("%d|%s", issue.Index, content) + if issue.IsPull { act.OpType = models.ActionCommentPull } else {