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-undo.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-undo.ts')
-rw-r--r-- | server/lib/activitypub/send/send-undo.ts | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/server/lib/activitypub/send/send-undo.ts b/server/lib/activitypub/send/send-undo.ts index 3a0597fba..4a08b5ca1 100644 --- a/server/lib/activitypub/send/send-undo.ts +++ b/server/lib/activitypub/send/send-undo.ts | |||
@@ -1,11 +1,5 @@ | |||
1 | import { Transaction } from 'sequelize' | 1 | import { Transaction } from 'sequelize' |
2 | import { | 2 | import { ActivityAudience, ActivityCreate, ActivityFollow, ActivityLike, ActivityUndo } from '../../../../shared/models/activitypub' |
3 | ActivityAudience, | ||
4 | ActivityCreate, | ||
5 | ActivityFollow, | ||
6 | ActivityLike, | ||
7 | ActivityUndo | ||
8 | } from '../../../../shared/models/activitypub' | ||
9 | import { ActorModel } from '../../../models/activitypub/actor' | 3 | import { ActorModel } from '../../../models/activitypub/actor' |
10 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' | 4 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
11 | import { VideoModel } from '../../../models/video/video' | 5 | import { VideoModel } from '../../../models/video/video' |
@@ -33,7 +27,7 @@ async function sendUndoFollow (actorFollow: ActorFollowModel, t: Transaction) { | |||
33 | const object = followActivityData(followUrl, me, following) | 27 | const object = followActivityData(followUrl, me, following) |
34 | const data = await undoActivityData(undoUrl, me, object, t) | 28 | const data = await undoActivityData(undoUrl, me, object, t) |
35 | 29 | ||
36 | return unicastTo(data, me, following.inboxUrl, t) | 30 | return unicastTo(data, me, following.inboxUrl) |
37 | } | 31 | } |
38 | 32 | ||
39 | async function sendUndoLikeToOrigin (byActor: ActorModel, video: VideoModel, t: Transaction) { | 33 | async function sendUndoLikeToOrigin (byActor: ActorModel, video: VideoModel, t: Transaction) { |
@@ -45,7 +39,7 @@ async function sendUndoLikeToOrigin (byActor: ActorModel, video: VideoModel, t: | |||
45 | const object = await likeActivityData(likeUrl, byActor, video, t) | 39 | const object = await likeActivityData(likeUrl, byActor, video, t) |
46 | const data = await undoActivityData(undoUrl, byActor, object, t, audience) | 40 | const data = await undoActivityData(undoUrl, byActor, object, t, audience) |
47 | 41 | ||
48 | return unicastTo(data, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl, t) | 42 | return unicastTo(data, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl) |
49 | } | 43 | } |
50 | 44 | ||
51 | async function sendUndoLikeToVideoFollowers (byActor: ActorModel, video: VideoModel, t: Transaction) { | 45 | async function sendUndoLikeToVideoFollowers (byActor: ActorModel, video: VideoModel, t: Transaction) { |
@@ -72,7 +66,7 @@ async function sendUndoDislikeToOrigin (byActor: ActorModel, video: VideoModel, | |||
72 | 66 | ||
73 | const data = await undoActivityData(undoUrl, byActor, object, t, audience) | 67 | const data = await undoActivityData(undoUrl, byActor, object, t, audience) |
74 | 68 | ||
75 | return unicastTo(data, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl, t) | 69 | return unicastTo(data, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl) |
76 | } | 70 | } |
77 | 71 | ||
78 | async function sendUndoDislikeToVideoFollowers (byActor: ActorModel, video: VideoModel, t: Transaction) { | 72 | async function sendUndoDislikeToVideoFollowers (byActor: ActorModel, video: VideoModel, t: Transaction) { |