1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 11:59:58 +02:00

Refactor notifier

This commit is contained in:
Chocobozzz 2021-07-30 16:51:27 +02:00
parent 2bee9db56a
commit d26836cd95
No known key found for this signature in database
GPG key ID: 583A612D890159BE
37 changed files with 1627 additions and 1231 deletions

View file

@ -1,5 +1,6 @@
import { WEBSERVER } from '../../initializers/constants'
import {
MAbuseFull,
MAbuseId,
MActor,
MActorFollowActors,
@ -112,6 +113,14 @@ function getUndoActivityPubUrl (originalUrl: string) {
return originalUrl + '/undo'
}
// ---------------------------------------------------------------------------
function getAbuseTargetUrl (abuse: MAbuseFull) {
return abuse.VideoAbuse?.Video?.url ||
abuse.VideoCommentAbuse?.VideoComment?.url ||
abuse.FlaggedAccount.Actor.url
}
export {
getLocalVideoActivityPubUrl,
getLocalVideoPlaylistActivityPubUrl,
@ -135,5 +144,6 @@ export {
getLocalVideoSharesActivityPubUrl,
getLocalVideoCommentsActivityPubUrl,
getLocalVideoLikesActivityPubUrl,
getLocalVideoDislikesActivityPubUrl
getLocalVideoDislikesActivityPubUrl,
getAbuseTargetUrl
}