aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/url.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/url.ts')
-rw-r--r--server/lib/activitypub/url.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts
index 7816b0be0..338398f2b 100644
--- a/server/lib/activitypub/url.ts
+++ b/server/lib/activitypub/url.ts
@@ -1,5 +1,6 @@
1import { WEBSERVER } from '../../initializers/constants' 1import { WEBSERVER } from '../../initializers/constants'
2import { 2import {
3 MAbuseFull,
3 MAbuseId, 4 MAbuseId,
4 MActor, 5 MActor,
5 MActorFollowActors, 6 MActorFollowActors,
@@ -112,6 +113,14 @@ function getUndoActivityPubUrl (originalUrl: string) {
112 return originalUrl + '/undo' 113 return originalUrl + '/undo'
113} 114}
114 115
116// ---------------------------------------------------------------------------
117
118function getAbuseTargetUrl (abuse: MAbuseFull) {
119 return abuse.VideoAbuse?.Video?.url ||
120 abuse.VideoCommentAbuse?.VideoComment?.url ||
121 abuse.FlaggedAccount.Actor.url
122}
123
115export { 124export {
116 getLocalVideoActivityPubUrl, 125 getLocalVideoActivityPubUrl,
117 getLocalVideoPlaylistActivityPubUrl, 126 getLocalVideoPlaylistActivityPubUrl,
@@ -135,5 +144,6 @@ export {
135 getLocalVideoSharesActivityPubUrl, 144 getLocalVideoSharesActivityPubUrl,
136 getLocalVideoCommentsActivityPubUrl, 145 getLocalVideoCommentsActivityPubUrl,
137 getLocalVideoLikesActivityPubUrl, 146 getLocalVideoLikesActivityPubUrl,
138 getLocalVideoDislikesActivityPubUrl 147 getLocalVideoDislikesActivityPubUrl,
148 getAbuseTargetUrl
139} 149}