aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-09-04 11:39:25 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-09-04 16:24:58 +0200
commit10a105f0c8620b2742eb357b69dd516a9ddf5798 (patch)
tree9bb8547f659ff37b2579e88849ba9fe12332a0dd /server/models/activitypub
parent6f1b4fa417786c2015f16b435e872aa65378efd7 (diff)
downloadPeerTube-10a105f0c8620b2742eb357b69dd516a9ddf5798.tar.gz
PeerTube-10a105f0c8620b2742eb357b69dd516a9ddf5798.tar.zst
PeerTube-10a105f0c8620b2742eb357b69dd516a9ddf5798.zip
Add notification on auto follow index
Diffstat (limited to 'server/models/activitypub')
-rw-r--r--server/models/activitypub/actor-follow.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts
index 0833b9a93..8498692f0 100644
--- a/server/models/activitypub/actor-follow.ts
+++ b/server/models/activitypub/actor-follow.ts
@@ -439,13 +439,13 @@ export class ActorFollowModel extends Model<ActorFollowModel> {
439 const followerId = (await getServerActor()).id 439 const followerId = (await getServerActor()).id
440 440
441 const query = { 441 const query = {
442 attributes: [], 442 attributes: [ 'id' ],
443 where: { 443 where: {
444 actorId: followerId 444 actorId: followerId
445 }, 445 },
446 include: [ 446 include: [
447 { 447 {
448 attributes: [ ], 448 attributes: [ 'id' ],
449 model: ActorModel.unscoped(), 449 model: ActorModel.unscoped(),
450 required: true, 450 required: true,
451 as: 'ActorFollowing', 451 as: 'ActorFollowing',
@@ -469,7 +469,7 @@ export class ActorFollowModel extends Model<ActorFollowModel> {
469 } 469 }
470 470
471 const res = await ActorFollowModel.findAll(query) 471 const res = await ActorFollowModel.findAll(query)
472 const followedHosts = res.map(res => res.ActorFollowing.Server.host) 472 const followedHosts = res.map(row => row.ActorFollowing.Server.host)
473 473
474 return difference(hosts, followedHosts) 474 return difference(hosts, followedHosts)
475 } 475 }