diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-27 11:37:33 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-27 11:37:33 -0400 |
commit | f470c241d6b1de30e4f500a6cf69f6ecd0cf8b41 (patch) | |
tree | aba8fc0973c410c938af5988e2e5d09374252738 /routers | |
parent | c796ed3849e3cd5b28cc8234edc71bbedafbc7da (diff) | |
download | gitea-f470c241d6b1de30e4f500a6cf69f6ecd0cf8b41.tar.gz gitea-f470c241d6b1de30e4f500a6cf69f6ecd0cf8b41.zip |
IP: RC Code Review
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index e53aebf636..49a098d6d6 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -78,8 +78,9 @@ func CreateIssue(ctx *middleware.Context, params martini.Params, form auth.Creat } // Notify watchers. - if err = models.NotifyWatchers(ctx.User.Id, ctx.Repo.Repository.Id, models.OP_CREATE_ISSUE, - ctx.User.Name, ctx.Repo.Repository.Name, "", fmt.Sprintf("%d|%s", issue.Index, issue.Name)); err != nil { + if err = models.NotifyWatchers(&models.Action{ActUserId: ctx.User.Id, ActUserName: ctx.User.Name, + OpType: models.OP_CREATE_ISSUE, Content: fmt.Sprintf("%d|%s", issue.Index, issue.Name), + RepoId: ctx.Repo.Repository.Id, RepoName: ctx.Repo.Repository.Name, RefName: ""}); err != nil { ctx.Handle(200, "issue.CreateIssue", err) return } @@ -120,6 +121,7 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) { return } issue.Poster = u + issue.Content = string(base.RenderMarkdown([]byte(issue.Content), "")) // Get comments. comments, err := models.GetIssueComments(issue.Id) @@ -136,6 +138,7 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) { return } comments[i].Poster = u + comments[i].Content = string(base.RenderMarkdown([]byte(comments[i].Content), "")) } ctx.Data["Title"] = issue.Name |