diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/activitypub/actor.ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index ecaa43dcf..8cedcc2bc 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts | |||
@@ -7,7 +7,7 @@ import { | |||
7 | Column, | 7 | Column, |
8 | CreatedAt, | 8 | CreatedAt, |
9 | DataType, | 9 | DataType, |
10 | Default, | 10 | Default, DefaultScope, |
11 | ForeignKey, | 11 | ForeignKey, |
12 | HasMany, | 12 | HasMany, |
13 | HasOne, | 13 | HasOne, |
@@ -41,6 +41,14 @@ enum ScopeNames { | |||
41 | FULL = 'FULL' | 41 | FULL = 'FULL' |
42 | } | 42 | } |
43 | 43 | ||
44 | @DefaultScope({ | ||
45 | include: [ | ||
46 | { | ||
47 | model: () => ServerModel, | ||
48 | required: false | ||
49 | } | ||
50 | ] | ||
51 | }) | ||
44 | @Scopes({ | 52 | @Scopes({ |
45 | [ScopeNames.FULL]: { | 53 | [ScopeNames.FULL]: { |
46 | include: [ | 54 | include: [ |
@@ -51,6 +59,10 @@ enum ScopeNames { | |||
51 | { | 59 | { |
52 | model: () => VideoChannelModel, | 60 | model: () => VideoChannelModel, |
53 | required: false | 61 | required: false |
62 | }, | ||
63 | { | ||
64 | model: () => ServerModel, | ||
65 | required: false | ||
54 | } | 66 | } |
55 | ] | 67 | ] |
56 | } | 68 | } |