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

Federate likes/dislikes

This commit is contained in:
Chocobozzz 2017-11-23 14:19:55 +01:00
parent d52eb8f656
commit 0032ebe94a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
27 changed files with 548 additions and 62 deletions

View file

@ -25,6 +25,14 @@ function getVideoViewActivityPubUrl (byAccount: AccountInstance, video: VideoIns
return video.url + '#views/' + byAccount.uuid + '/' + new Date().toISOString()
}
function getVideoLikeActivityPubUrl (byAccount: AccountInstance, video: VideoInstance) {
return byAccount.url + '#likes/' + video.id
}
function getVideoDislikeActivityPubUrl (byAccount: AccountInstance, video: VideoInstance) {
return byAccount.url + '#dislikes/' + video.id
}
function getAccountFollowActivityPubUrl (accountFollow: AccountFollowInstance) {
const me = accountFollow.AccountFollower
const following = accountFollow.AccountFollowing
@ -61,5 +69,7 @@ export {
getAnnounceActivityPubUrl,
getUpdateActivityPubUrl,
getUndoActivityPubUrl,
getVideoViewActivityPubUrl
getVideoViewActivityPubUrl,
getVideoLikeActivityPubUrl,
getVideoDislikeActivityPubUrl
}