aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/activitypub/actor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/activitypub/actor.ts')
-rw-r--r--server/models/activitypub/actor.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts
index 119d0c1da..ef8dd9f7c 100644
--- a/server/models/activitypub/actor.ts
+++ b/server/models/activitypub/actor.ts
@@ -76,7 +76,13 @@ export const unusedActorAttributesForAPI = [
76 }, 76 },
77 { 77 {
78 model: () => VideoChannelModel.unscoped(), 78 model: () => VideoChannelModel.unscoped(),
79 required: false 79 required: false,
80 include: [
81 {
82 model: () => AccountModel,
83 required: true
84 }
85 ]
80 }, 86 },
81 { 87 {
82 model: () => ServerModel, 88 model: () => ServerModel,
@@ -337,6 +343,7 @@ export class ActorModel extends Model<ActorModel> {
337 uuid: this.uuid, 343 uuid: this.uuid,
338 name: this.preferredUsername, 344 name: this.preferredUsername,
339 host: this.getHost(), 345 host: this.getHost(),
346 hostRedundancyAllowed: this.getRedundancyAllowed(),
340 followingCount: this.followingCount, 347 followingCount: this.followingCount,
341 followersCount: this.followersCount, 348 followersCount: this.followersCount,
342 avatar, 349 avatar,
@@ -440,6 +447,10 @@ export class ActorModel extends Model<ActorModel> {
440 return this.Server ? this.Server.host : CONFIG.WEBSERVER.HOST 447 return this.Server ? this.Server.host : CONFIG.WEBSERVER.HOST
441 } 448 }
442 449
450 getRedundancyAllowed () {
451 return this.Server ? this.Server.redundancyAllowed : false
452 }
453
443 getAvatarUrl () { 454 getAvatarUrl () {
444 if (!this.avatarId) return undefined 455 if (!this.avatarId) return undefined
445 456