summaryrefslogtreecommitdiffstats
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index cf454bc8fb..5fe9ebc390 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -687,9 +687,17 @@ func Comment(ctx *middleware.Context, params martini.Params) {
}
// Notify watchers.
- if err = models.NotifyWatchers(&models.Action{ActUserId: ctx.User.Id, ActUserName: ctx.User.Name, ActEmail: ctx.User.Email,
- OpType: models.OP_COMMENT_ISSUE, Content: fmt.Sprintf("%d|%s", issue.Index, strings.Split(content, "\n")[0]),
- RepoId: ctx.Repo.Repository.Id, RepoName: ctx.Repo.Repository.Name, RefName: ""}); err != nil {
+ act := &models.Action{
+ ActUserId: ctx.User.Id,
+ ActUserName: ctx.User.LowerName,
+ ActEmail: ctx.User.Email,
+ OpType: models.OP_COMMENT_ISSUE,
+ Content: fmt.Sprintf("%d|%s", issue.Index, strings.Split(content, "\n")[0]),
+ RepoId: ctx.Repo.Repository.Id,
+ RepoUserName: ctx.Repo.Owner.LowerName,
+ RepoName: ctx.Repo.Repository.LowerName,
+ }
+ if err = models.NotifyWatchers(act); err != nil {
ctx.Handle(500, "issue.CreateIssue(NotifyWatchers)", err)
return
}