diff options
author | Chocobozzz <me@florianbigard.com> | 2018-11-14 15:01:28 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-11-14 16:32:27 +0100 |
commit | 5c6d985faeef1d6793d3f44ca6374f1a9b722806 (patch) | |
tree | 567e31a84e721bf762189582f92ac2ec5c402bcc /server/lib/activitypub/url.ts | |
parent | df66d81583e07ce049daeeef1edc6a87b57b3684 (diff) | |
download | PeerTube-5c6d985faeef1d6793d3f44ca6374f1a9b722806.tar.gz PeerTube-5c6d985faeef1d6793d3f44ca6374f1a9b722806.tar.zst PeerTube-5c6d985faeef1d6793d3f44ca6374f1a9b722806.zip |
Check activities host
Diffstat (limited to 'server/lib/activitypub/url.ts')
-rw-r--r-- | server/lib/activitypub/url.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts index e792be698..38f15448c 100644 --- a/server/lib/activitypub/url.ts +++ b/server/lib/activitypub/url.ts | |||
@@ -33,14 +33,14 @@ function getVideoAbuseActivityPubUrl (videoAbuse: VideoAbuseModel) { | |||
33 | } | 33 | } |
34 | 34 | ||
35 | function getVideoViewActivityPubUrl (byActor: ActorModel, video: VideoModel) { | 35 | function getVideoViewActivityPubUrl (byActor: ActorModel, video: VideoModel) { |
36 | return video.url + '/views/' + byActor.uuid + '/' + new Date().toISOString() | 36 | return byActor.url + '/views/videos/' + video.id + '/' + new Date().toISOString() |
37 | } | 37 | } |
38 | 38 | ||
39 | function getVideoLikeActivityPubUrl (byActor: ActorModel, video: VideoModel) { | 39 | function getVideoLikeActivityPubUrl (byActor: ActorModel, video: VideoModel | { id: number }) { |
40 | return byActor.url + '/likes/' + video.id | 40 | return byActor.url + '/likes/' + video.id |
41 | } | 41 | } |
42 | 42 | ||
43 | function getVideoDislikeActivityPubUrl (byActor: ActorModel, video: VideoModel) { | 43 | function getVideoDislikeActivityPubUrl (byActor: ActorModel, video: VideoModel | { id: number }) { |
44 | return byActor.url + '/dislikes/' + video.id | 44 | return byActor.url + '/dislikes/' + video.id |
45 | } | 45 | } |
46 | 46 | ||
@@ -74,8 +74,8 @@ function getActorFollowAcceptActivityPubUrl (actorFollow: ActorFollowModel) { | |||
74 | return follower.url + '/accepts/follows/' + me.id | 74 | return follower.url + '/accepts/follows/' + me.id |
75 | } | 75 | } |
76 | 76 | ||
77 | function getAnnounceActivityPubUrl (originalUrl: string, byActor: ActorModel) { | 77 | function getVideoAnnounceActivityPubUrl (byActor: ActorModel, video: VideoModel) { |
78 | return originalUrl + '/announces/' + byActor.id | 78 | return video.url + '/announces/' + byActor.id |
79 | } | 79 | } |
80 | 80 | ||
81 | function getDeleteActivityPubUrl (originalUrl: string) { | 81 | function getDeleteActivityPubUrl (originalUrl: string) { |
@@ -97,7 +97,7 @@ export { | |||
97 | getVideoAbuseActivityPubUrl, | 97 | getVideoAbuseActivityPubUrl, |
98 | getActorFollowActivityPubUrl, | 98 | getActorFollowActivityPubUrl, |
99 | getActorFollowAcceptActivityPubUrl, | 99 | getActorFollowAcceptActivityPubUrl, |
100 | getAnnounceActivityPubUrl, | 100 | getVideoAnnounceActivityPubUrl, |
101 | getUpdateActivityPubUrl, | 101 | getUpdateActivityPubUrl, |
102 | getUndoActivityPubUrl, | 102 | getUndoActivityPubUrl, |
103 | getVideoViewActivityPubUrl, | 103 | getVideoViewActivityPubUrl, |