summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-07-04 16:48:36 -0400
committerUnknown <joe2010xtmf@163.com>2014-07-04 16:48:36 -0400
commitbe8ac7fb75a389402929dd726f39bbbbdb9a6531 (patch)
treeadd27b884bc67d9f04cc13befe081cd64e0706b3 /routers
parent7f3015b32b27d18300c0baaf26729a89dec43985 (diff)
downloadgitea-be8ac7fb75a389402929dd726f39bbbbdb9a6531.tar.gz
gitea-be8ac7fb75a389402929dd726f39bbbbdb9a6531.zip
fix #273
Diffstat (limited to 'routers')
-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
}