aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/send/send-undo.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-30 17:02:40 +0200
committerChocobozzz <me@florianbigard.com>2018-07-30 17:02:40 +0200
commit8e0fd45e14993793c64e06682a4a05c29068d398 (patch)
tree4567d24150f1c633181095e755d3291c4b32cead /server/lib/activitypub/send/send-undo.ts
parent43c4c63937b63ed1f41b17f4cc8fe652a6d010fc (diff)
downloadPeerTube-8e0fd45e14993793c64e06682a4a05c29068d398.tar.gz
PeerTube-8e0fd45e14993793c64e06682a4a05c29068d398.tar.zst
PeerTube-8e0fd45e14993793c64e06682a4a05c29068d398.zip
Add more info logging
Diffstat (limited to 'server/lib/activitypub/send/send-undo.ts')
-rw-r--r--server/lib/activitypub/send/send-undo.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/lib/activitypub/send/send-undo.ts b/server/lib/activitypub/send/send-undo.ts
index 33c3d2429..4e5dd3973 100644
--- a/server/lib/activitypub/send/send-undo.ts
+++ b/server/lib/activitypub/send/send-undo.ts
@@ -18,11 +18,14 @@ import { followActivityData } from './send-follow'
18import { likeActivityData } from './send-like' 18import { likeActivityData } from './send-like'
19import { VideoShareModel } from '../../../models/video/video-share' 19import { VideoShareModel } from '../../../models/video/video-share'
20import { buildVideoAnnounce } from './send-announce' 20import { buildVideoAnnounce } from './send-announce'
21import { logger } from '../../../helpers/logger'
21 22
22async function sendUndoFollow (actorFollow: ActorFollowModel, t: Transaction) { 23async function sendUndoFollow (actorFollow: ActorFollowModel, t: Transaction) {
23 const me = actorFollow.ActorFollower 24 const me = actorFollow.ActorFollower
24 const following = actorFollow.ActorFollowing 25 const following = actorFollow.ActorFollowing
25 26
27 logger.info('Creating job to send an unfollow request to %s.', following.url)
28
26 const followUrl = getActorFollowActivityPubUrl(actorFollow) 29 const followUrl = getActorFollowActivityPubUrl(actorFollow)
27 const undoUrl = getUndoActivityPubUrl(followUrl) 30 const undoUrl = getUndoActivityPubUrl(followUrl)
28 31
@@ -33,6 +36,8 @@ async function sendUndoFollow (actorFollow: ActorFollowModel, t: Transaction) {
33} 36}
34 37
35async function sendUndoLike (byActor: ActorModel, video: VideoModel, t: Transaction) { 38async function sendUndoLike (byActor: ActorModel, video: VideoModel, t: Transaction) {
39 logger.info('Creating job to undo a like of video %s.', video.url)
40
36 const likeUrl = getVideoLikeActivityPubUrl(byActor, video) 41 const likeUrl = getVideoLikeActivityPubUrl(byActor, video)
37 const undoUrl = getUndoActivityPubUrl(likeUrl) 42 const undoUrl = getUndoActivityPubUrl(likeUrl)
38 43
@@ -55,6 +60,8 @@ async function sendUndoLike (byActor: ActorModel, video: VideoModel, t: Transact
55} 60}
56 61
57async function sendUndoDislike (byActor: ActorModel, video: VideoModel, t: Transaction) { 62async function sendUndoDislike (byActor: ActorModel, video: VideoModel, t: Transaction) {
63 logger.info('Creating job to undo a dislike of video %s.', video.url)
64
58 const dislikeUrl = getVideoDislikeActivityPubUrl(byActor, video) 65 const dislikeUrl = getVideoDislikeActivityPubUrl(byActor, video)
59 const undoUrl = getUndoActivityPubUrl(dislikeUrl) 66 const undoUrl = getUndoActivityPubUrl(dislikeUrl)
60 67
@@ -76,6 +83,8 @@ async function sendUndoDislike (byActor: ActorModel, video: VideoModel, t: Trans
76} 83}
77 84
78async function sendUndoAnnounce (byActor: ActorModel, videoShare: VideoShareModel, video: VideoModel, t: Transaction) { 85async function sendUndoAnnounce (byActor: ActorModel, videoShare: VideoShareModel, video: VideoModel, t: Transaction) {
86 logger.info('Creating job to undo announce %s.', videoShare.url)
87
79 const undoUrl = getUndoActivityPubUrl(videoShare.url) 88 const undoUrl = getUndoActivityPubUrl(videoShare.url)
80 89
81 const actorsInvolvedInVideo = await getActorsInvolvedInVideo(video, t) 90 const actorsInvolvedInVideo = await getActorsInvolvedInVideo(video, t)