diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2017-03-29 20:54:57 -0300 |
---|---|---|
committer | Andrey Nering <andrey.nering@gmail.com> | 2017-03-29 20:54:57 -0300 |
commit | aa6e949b3de11e675311e54b59e027cd82a230f4 (patch) | |
tree | b56c680bdcef1ea367742a437d114c422394aa84 /models/issue_watch.go | |
parent | b6744607484008826d18f129326664105b9d7bfc (diff) | |
download | gitea-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.go | 10 |
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 +} |