X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Faccount%2Faccount.ts;h=f97519b1403eac1c5d42280aa40ea5e8bf9e6a52;hb=fb7194043d0486ce0a6a40b2ffbdf32878c33a6f;hp=466d6258e1cdafce825adab256c83c38bb92aa6f;hpb=d95d15598847c7f020aa056e7e6e0c02d2bbf732;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 466d6258e..f97519b14 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts @@ -42,6 +42,7 @@ export enum ScopeNames { } export type SummaryOptions = { + actorRequired?: boolean // Default: true whereActor?: WhereOptions withAccountBlockerIds?: number[] } @@ -65,12 +66,12 @@ export type SummaryOptions = { } const query: FindOptions = { - attributes: [ 'id', 'name' ], + attributes: [ 'id', 'name', 'actorId' ], include: [ { attributes: [ 'id', 'preferredUsername', 'url', 'serverId', 'avatarId' ], model: ActorModel.unscoped(), - required: true, + required: options.actorRequired ?? true, where: whereActor, include: [ serverInclude,