summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/models/issue.go b/models/issue.go
index 2b71e0776d..9d081471a7 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -1204,8 +1204,11 @@ func GetParticipantsByIssueID(issueID int64) ([]*User, error) {
func getParticipantsByIssueID(e Engine, issueID int64) ([]*User, error) {
userIDs := make([]int64, 0, 5)
if err := e.Table("comment").Cols("poster_id").
- Where("issue_id = ?", issueID).
- And("type = ?", CommentTypeComment).
+ Where("`comment`.issue_id = ?", issueID).
+ And("`comment`.type = ?", CommentTypeComment).
+ And("`user`.is_active = ?", true).
+ And("`user`.prohibit_login = ?", false).
+ Join("INNER", "user", "`user`.id = `comment`.poster_id").
Distinct("poster_id").
Find(&userIDs); err != nil {
return nil, fmt.Errorf("get poster IDs: %v", err)