Consider issue_watchers while sending notifications

This commit is contained in:
Andrey Nering committed 2017-03-29 20:54:57 -03:00
1 parent b674460748
commit aa6e949b3d
2 files changed
+43 -9

No files matched your search

+10
View File
@@ -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
}