diff options
Diffstat (limited to 'server/models/account')
-rw-r--r-- | server/models/account/account-video-rate.ts | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/server/models/account/account-video-rate.ts b/server/models/account/account-video-rate.ts index d5c214ecb..4bd8114cf 100644 --- a/server/models/account/account-video-rate.ts +++ b/server/models/account/account-video-rate.ts | |||
@@ -6,7 +6,7 @@ import { CONSTRAINTS_FIELDS, VIDEO_RATE_TYPES } from '../../initializers/constan | |||
6 | import { VideoModel } from '../video/video' | 6 | import { VideoModel } from '../video/video' |
7 | import { AccountModel } from './account' | 7 | import { AccountModel } from './account' |
8 | import { ActorModel } from '../activitypub/actor' | 8 | import { ActorModel } from '../activitypub/actor' |
9 | import { getSort, throwIfNotValid } from '../utils' | 9 | import { buildLocalAccountIdsIn, getSort, throwIfNotValid } from '../utils' |
10 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | 10 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' |
11 | import { AccountVideoRate } from '../../../shared' | 11 | import { AccountVideoRate } from '../../../shared' |
12 | import { ScopeNames as VideoChannelScopeNames, SummaryOptions, VideoChannelModel } from '../video/video-channel' | 12 | import { ScopeNames as VideoChannelScopeNames, SummaryOptions, VideoChannelModel } from '../video/video-channel' |
@@ -219,25 +219,11 @@ export class AccountVideoRateModel extends Model<AccountVideoRateModel> { | |||
219 | [Op.lt]: beforeUpdatedAt | 219 | [Op.lt]: beforeUpdatedAt |
220 | }, | 220 | }, |
221 | videoId, | 221 | videoId, |
222 | type | 222 | type, |
223 | }, | 223 | accountId: { |
224 | include: [ | 224 | [Op.notIn]: buildLocalAccountIdsIn() |
225 | { | ||
226 | model: AccountModel.unscoped(), | ||
227 | required: true, | ||
228 | include: [ | ||
229 | { | ||
230 | model: ActorModel.unscoped(), | ||
231 | required: true, | ||
232 | where: { | ||
233 | serverId: { | ||
234 | [Op.ne]: null | ||
235 | } | ||
236 | } | ||
237 | } | ||
238 | ] | ||
239 | } | 225 | } |
240 | ], | 226 | }, |
241 | transaction: t | 227 | transaction: t |
242 | } | 228 | } |
243 | 229 | ||