mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 11:59:58 +02:00
Refactor notifier
This commit is contained in:
parent
2bee9db56a
commit
d26836cd95
37 changed files with 1627 additions and 1231 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue