diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-25 15:05:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-25 18:41:17 +0100 |
commit | 94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4 (patch) | |
tree | 32a9148e0e4567f0c4ffae0412cbed20b84e8873 /server/lib/activitypub/send/send-follow.ts | |
parent | d765fafc3faf0db9818eb1a07161df1cb1bc0efa (diff) | |
download | PeerTube-94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4.tar.gz PeerTube-94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4.tar.zst PeerTube-94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4.zip |
Move job queue to redis
We'll use it as cache in the future.
/!\ You'll loose your old jobs (pending jobs too) so upgrade only when
you don't have pending job anymore.
Diffstat (limited to 'server/lib/activitypub/send/send-follow.ts')
-rw-r--r-- | server/lib/activitypub/send/send-follow.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/lib/activitypub/send/send-follow.ts b/server/lib/activitypub/send/send-follow.ts index eac60e94f..4e9865af4 100644 --- a/server/lib/activitypub/send/send-follow.ts +++ b/server/lib/activitypub/send/send-follow.ts | |||
@@ -1,18 +1,17 @@ | |||
1 | import { Transaction } from 'sequelize' | ||
2 | import { ActivityFollow } from '../../../../shared/models/activitypub' | 1 | import { ActivityFollow } from '../../../../shared/models/activitypub' |
3 | import { ActorModel } from '../../../models/activitypub/actor' | 2 | import { ActorModel } from '../../../models/activitypub/actor' |
4 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' | 3 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
5 | import { getActorFollowActivityPubUrl } from '../url' | 4 | import { getActorFollowActivityPubUrl } from '../url' |
6 | import { unicastTo } from './misc' | 5 | import { unicastTo } from './misc' |
7 | 6 | ||
8 | function sendFollow (actorFollow: ActorFollowModel, t: Transaction) { | 7 | function sendFollow (actorFollow: ActorFollowModel) { |
9 | const me = actorFollow.ActorFollower | 8 | const me = actorFollow.ActorFollower |
10 | const following = actorFollow.ActorFollowing | 9 | const following = actorFollow.ActorFollowing |
11 | 10 | ||
12 | const url = getActorFollowActivityPubUrl(actorFollow) | 11 | const url = getActorFollowActivityPubUrl(actorFollow) |
13 | const data = followActivityData(url, me, following) | 12 | const data = followActivityData(url, me, following) |
14 | 13 | ||
15 | return unicastTo(data, me, following.inboxUrl, t) | 14 | return unicastTo(data, me, following.inboxUrl) |
16 | } | 15 | } |
17 | 16 | ||
18 | function followActivityData (url: string, byActor: ActorModel, targetActor: ActorModel): ActivityFollow { | 17 | function followActivityData (url: string, byActor: ActorModel, targetActor: ActorModel): ActivityFollow { |