aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account-blocklist.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-17 16:06:58 +0200
committerChocobozzz <me@florianbigard.com>2022-06-17 16:06:58 +0200
commitd3976db269a0e5a3256867a7fc614d3c54c58720 (patch)
treec6cccee493ff773ef18195fba12c6843349f8b80 /server/models/account/account-blocklist.ts
parentba73bedda6ad72b0accd51e594b1b3e193d50e87 (diff)
downloadPeerTube-d3976db269a0e5a3256867a7fc614d3c54c58720.tar.gz
PeerTube-d3976db269a0e5a3256867a7fc614d3c54c58720.tar.zst
PeerTube-d3976db269a0e5a3256867a7fc614d3c54c58720.zip
Fix searching in blocklist
Diffstat (limited to 'server/models/account/account-blocklist.ts')
-rw-r--r--server/models/account/account-blocklist.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/models/account/account-blocklist.ts b/server/models/account/account-blocklist.ts
index a7b8db076..377249b38 100644
--- a/server/models/account/account-blocklist.ts
+++ b/server/models/account/account-blocklist.ts
@@ -132,6 +132,20 @@ export class AccountBlocklistModel extends Model<Partial<AttributesOnly<AccountB
132 as: 'BlockedAccount' 132 as: 'BlockedAccount'
133 } 133 }
134 ] 134 ]
135 } else if (search) { // We need some joins when counting with search
136 query.include = [
137 {
138 model: AccountModel.unscoped(),
139 required: true,
140 as: 'BlockedAccount',
141 include: [
142 {
143 model: ActorModel.unscoped(),
144 required: true
145 }
146 ]
147 }
148 ]
135 } 149 }
136 150
137 return query 151 return query