summaryrefslogtreecommitdiffstats
path: root/models/issue_watch.go
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2017-03-29 20:54:57 -0300
committerAndrey Nering <andrey.nering@gmail.com>2017-03-29 20:54:57 -0300
commitaa6e949b3de11e675311e54b59e027cd82a230f4 (patch)
treeb56c680bdcef1ea367742a437d114c422394aa84 /models/issue_watch.go
parentb6744607484008826d18f129326664105b9d7bfc (diff)
downloadgitea-aa6e949b3de11e675311e54b59e027cd82a230f4.tar.gz
gitea-aa6e949b3de11e675311e54b59e027cd82a230f4.zip
Consider issue_watchers while sending notifications
Diffstat (limited to 'models/issue_watch.go')
-rw-r--r--models/issue_watch.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/models/issue_watch.go b/models/issue_watch.go
index d082211c77..03a677a3a0 100644
--- a/models/issue_watch.go
+++ b/models/issue_watch.go
@@ -58,3 +58,13 @@ func getIssueWatch(e Engine, userID, issueID int64) (iw *IssueWatch, exists bool
Get(iw)
return
}
+
+func GetIssueWatchers(issueID int64) ([]*IssueWatch, error) {
+ return getIssueWatchers(x, issueID)
+}
+func getIssueWatchers(e Engine, issueID int64) (watches []*IssueWatch, err error) {
+ err = e.
+ Where("issue_id = ?", issueID).
+ Find(&watches)
+ return
+}