1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Consider issue_watchers while sending notifications

This commit is contained in:
Andrey Nering
2017-03-29 20:54:57 -03:00
parent b674460748
commit aa6e949b3d
2 changed files with 43 additions and 9 deletions

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
}