diff options
author | Unknwon <u@gogs.io> | 2017-07-27 16:53:02 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-07-27 16:53:02 -0400 |
commit | 6bc11c44504135b232605c932c519901a680d4e1 (patch) | |
tree | e12a8d108ef2d00347a2d1789d50f61a1617cfaf /models/comment.go | |
parent | 643c85e9c8fd237912652d14a0535dfddf614d2b (diff) |
hook: fix email not sent after push (#4430)
Turns out mail service was not initialized at all, also mail must
be sent in sync in hook mode before program exits.
Diffstat (limited to 'models/comment.go')
-rw-r--r-- | models/comment.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/comment.go b/models/comment.go index 1be559b0..bcea2268 100644 --- a/models/comment.go +++ b/models/comment.go @@ -188,7 +188,7 @@ func (cmt *Comment) mailParticipants(e Engine, opType ActionType, issue *Issue) issue.Content = fmt.Sprintf("Reopened #%d", issue.Index) } if err = mailIssueCommentToParticipants(issue, cmt.Poster, mentions); err != nil { - log.Error(4, "mailIssueCommentToParticipants: %v", err) + log.Error(2, "mailIssueCommentToParticipants: %v", err) } return nil @@ -290,10 +290,10 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err // Notify watchers for whatever action comes in, ignore if no action type. if act.OpType > 0 { if err = notifyWatchers(e, act); err != nil { - log.Error(4, "notifyWatchers: %v", err) + log.Error(2, "notifyWatchers: %v", err) } if err = comment.mailParticipants(e, act.OpType, opts.Issue); err != nil { - log.Error(4, "MailParticipants: %v", err) + log.Error(2, "MailParticipants: %v", err) } } |