mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		@@ -92,13 +92,22 @@ func (a *actionNotifier) NotifyCreateIssueComment(doer *models.User, repo *model
 | 
				
			|||||||
	act := &models.Action{
 | 
						act := &models.Action{
 | 
				
			||||||
		ActUserID: doer.ID,
 | 
							ActUserID: doer.ID,
 | 
				
			||||||
		ActUser:   doer,
 | 
							ActUser:   doer,
 | 
				
			||||||
		Content:   fmt.Sprintf("%d|%s", issue.Index, comment.Content),
 | 
					 | 
				
			||||||
		RepoID:    issue.Repo.ID,
 | 
							RepoID:    issue.Repo.ID,
 | 
				
			||||||
		Repo:      issue.Repo,
 | 
							Repo:      issue.Repo,
 | 
				
			||||||
		Comment:   comment,
 | 
							Comment:   comment,
 | 
				
			||||||
		CommentID: comment.ID,
 | 
							CommentID: comment.ID,
 | 
				
			||||||
		IsPrivate: issue.Repo.IsPrivate,
 | 
							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 {
 | 
						if issue.IsPull {
 | 
				
			||||||
		act.OpType = models.ActionCommentPull
 | 
							act.OpType = models.ActionCommentPull
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user