forked from kevadesu/forgejo
Consider issue_watchers while sending notifications
This commit is contained in:
parent
b674460748
commit
aa6e949b3d
2 changed files with 43 additions and 9 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue