summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-08-28 10:26:04 +0800
committerGitHub <noreply@github.com>2017-08-28 10:26:04 +0800
commite41da3845d72e3adc7ae2cd3a02fc1f3943ebee6 (patch)
treedd1f53ed3c56c6b96a9b2f66c530f95d4634bc68 /models
parent0f2c98adcdfee02eda9f82a58f5c1aefe2a891a5 (diff)
downloadgitea-e41da3845d72e3adc7ae2cd3a02fc1f3943ebee6.tar.gz
gitea-e41da3845d72e3adc7ae2cd3a02fc1f3943ebee6.zip
fix duplicated feed (#2370)
Diffstat (limited to 'models')
-rw-r--r--models/action.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/models/action.go b/models/action.go
index 591b992add..32b3dbd7bc 100644
--- a/models/action.go
+++ b/models/action.go
@@ -713,7 +713,6 @@ type GetFeedsOptions struct {
IncludePrivate bool // include private actions
OnlyPerformedBy bool // only actions performed by requested user
IncludeDeleted bool // include deleted actions
- Collaborate bool // Include collaborative repositories
}
// GetFeeds returns actions according to the provided options
@@ -733,13 +732,7 @@ func GetFeeds(opts GetFeedsOptions) ([]*Action, error) {
cond = cond.And(builder.In("repo_id", repoIDs))
}
- var userIDCond builder.Cond = builder.Eq{"user_id": opts.RequestedUser.ID}
- if opts.Collaborate {
- userIDCond = userIDCond.Or(builder.Expr(
- "repo_id IN (SELECT repo_id FROM `access` WHERE access.user_id = ?)",
- opts.RequestedUser.ID))
- }
- cond = cond.And(userIDCond)
+ cond = cond.And(builder.Eq{"user_id": opts.RequestedUser.ID})
if opts.OnlyPerformedBy {
cond = cond.And(builder.Eq{"act_user_id": opts.RequestedUser.ID})