From 60650c77c8a2a98e92d869b237ae4900f369a8fc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Jan 2018 09:35:50 +0100 Subject: Add scores to follows and remove bad ones --- server/models/activitypub/actor.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'server/models/activitypub/actor.ts') diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index b88e06b41..912d8d748 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts @@ -204,7 +204,7 @@ export class ActorModel extends Model { VideoChannel: VideoChannelModel static load (id: number) { - return ActorModel.scope(ScopeNames.FULL).findById(id) + return ActorModel.unscoped().findById(id) } static listByFollowersUrls (followersUrls: string[], transaction?: Sequelize.Transaction) { @@ -267,20 +267,17 @@ export class ActorModel extends Model { avatar = this.Avatar.toFormattedJSON() } - let score: number - if (this.Server) { - score = this.Server.score - } - return { id: this.id, url: this.url, uuid: this.uuid, + name: this.preferredUsername, host: this.getHost(), - score, followingCount: this.followingCount, followersCount: this.followersCount, - avatar + avatar, + createdAt: this.createdAt, + updatedAt: this.updatedAt } } -- cgit v1.2.3