summaryrefslogtreecommitdiffstats
path: root/modules/mailer
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-07 16:51:14 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-07 16:51:14 -0400
commit33d32585b1b7232c764e8cb8629a33076902c882 (patch)
tree4450575c9a0a71c8a7d51e9b4eafee321226d8c2 /modules/mailer
parent6fb7229beaadb53f59cb85d80976f99708a7434d (diff)
downloadgitea-33d32585b1b7232c764e8cb8629a33076902c882.tar.gz
gitea-33d32585b1b7232c764e8cb8629a33076902c882.zip
Add mention, read/unread support of issue tracker
Diffstat (limited to 'modules/mailer')
-rw-r--r--modules/mailer/mail.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/mailer/mail.go b/modules/mailer/mail.go
index 2262b5455f..93ec1153f0 100644
--- a/modules/mailer/mail.go
+++ b/modules/mailer/mail.go
@@ -114,20 +114,20 @@ func SendResetPasswdMail(r *middleware.Render, user *models.User) {
// SendIssueNotifyMail sends mail notification of all watchers of repository.
func SendIssueNotifyMail(user, owner *models.User, repo *models.Repository, issue *models.Issue) ([]string, error) {
- watches, err := models.GetWatches(repo.Id)
+ ws, err := models.GetWatchers(repo.Id)
if err != nil {
- return nil, errors.New("mail.NotifyWatchers(get watches): " + err.Error())
+ return nil, errors.New("mail.NotifyWatchers(GetWatchers): " + err.Error())
}
- tos := make([]string, 0, len(watches))
- for i := range watches {
- uid := watches[i].UserId
+ tos := make([]string, 0, len(ws))
+ for i := range ws {
+ uid := ws[i].Uid
if user.Id == uid {
continue
}
u, err := models.GetUserById(uid)
if err != nil {
- return nil, errors.New("mail.NotifyWatchers(get user): " + err.Error())
+ return nil, errors.New("mail.NotifyWatchers(GetUserById): " + err.Error())
}
tos = append(tos, u.Email)
}