summaryrefslogtreecommitdiffstats
path: root/models/issues
diff options
context:
space:
mode:
authorzenofile <tschubert@bafh.org>2022-10-18 10:01:02 +0200
committerGitHub <noreply@github.com>2022-10-18 10:01:02 +0200
commit20a5452ea64e73b921b56d39195c71514c14f3c3 (patch)
tree1b8615283e9bf6a03fefe099587507e80c9687e6 /models/issues
parent716fcfcf72be6af854d800f3e2c885b9806577e6 (diff)
downloadgitea-20a5452ea64e73b921b56d39195c71514c14f3c3.tar.gz
gitea-20a5452ea64e73b921b56d39195c71514c14f3c3.zip
Fix viewing user subscriptions (#21482)
Fix enumeration of user subscriptions. `watch.mode` is not a boolean but a smallint. Fixes #21447 Regression of #17156
Diffstat (limited to 'models/issues')
-rw-r--r--models/issues/issue.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/issues/issue.go b/models/issues/issue.go
index e56e43bd1a..f77166db11 100644
--- a/models/issues/issue.go
+++ b/models/issues/issue.go
@@ -1496,7 +1496,8 @@ func applySubscribedCondition(sess *xorm.Session, subscriberID int64) *xorm.Sess
builder.In("issue.repo_id", builder.
Select("id").
From("watch").
- Where(builder.Eq{"user_id": subscriberID, "mode": true}),
+ Where(builder.And(builder.Eq{"user_id": subscriberID},
+ builder.In("mode", repo_model.WatchModeNormal, repo_model.WatchModeAuto))),
),
),
)