1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add shares forward and collection on videos/video channels

This commit is contained in:
Chocobozzz 2017-11-27 14:44:51 +01:00
parent 74bb2cb834
commit 4e50b6a1c9
No known key found for this signature in database
GPG key ID: 583A612D890159BE
29 changed files with 546 additions and 133 deletions

View file

@ -22,37 +22,37 @@ function getVideoAbuseActivityPubUrl (videoAbuse: VideoAbuseInstance) {
}
function getVideoViewActivityPubUrl (byAccount: AccountInstance, video: VideoInstance) {
return video.url + '#views/' + byAccount.uuid + '/' + new Date().toISOString()
return video.url + '/views/' + byAccount.uuid + '/' + new Date().toISOString()
}
function getVideoLikeActivityPubUrl (byAccount: AccountInstance, video: VideoInstance) {
return byAccount.url + '#likes/' + video.id
return byAccount.url + '/likes/' + video.id
}
function getVideoDislikeActivityPubUrl (byAccount: AccountInstance, video: VideoInstance) {
return byAccount.url + '#dislikes/' + video.id
return byAccount.url + '/dislikes/' + video.id
}
function getAccountFollowActivityPubUrl (accountFollow: AccountFollowInstance) {
const me = accountFollow.AccountFollower
const following = accountFollow.AccountFollowing
return me.url + '#follows/' + following.id
return me.url + '/follows/' + following.id
}
function getAccountFollowAcceptActivityPubUrl (accountFollow: AccountFollowInstance) {
const follower = accountFollow.AccountFollower
const me = accountFollow.AccountFollowing
return follower.url + '#accepts/follows/' + me.id
return follower.url + '/accepts/follows/' + me.id
}
function getAnnounceActivityPubUrl (originalUrl: string, byAccount: AccountInstance) {
return originalUrl + '#announces/' + byAccount.id
return originalUrl + '/announces/' + byAccount.id
}
function getUpdateActivityPubUrl (originalUrl: string, updatedAt: string) {
return originalUrl + '#updates/' + updatedAt
return originalUrl + '/updates/' + updatedAt
}
function getUndoActivityPubUrl (originalUrl: string) {