aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/custom-validators/activitypub/activity.ts5
-rw-r--r--server/helpers/custom-validators/activitypub/video-comments.ts7
2 files changed, 9 insertions, 3 deletions
diff --git a/server/helpers/custom-validators/activitypub/activity.ts b/server/helpers/custom-validators/activitypub/activity.ts
index 856c87f2c..577cf4b52 100644
--- a/server/helpers/custom-validators/activitypub/activity.ts
+++ b/server/helpers/custom-validators/activitypub/activity.ts
@@ -5,7 +5,7 @@ import { isAnnounceActivityValid } from './announce'
5import { isActivityPubUrlValid } from './misc' 5import { isActivityPubUrlValid } from './misc'
6import { isDislikeActivityValid, isLikeActivityValid } from './rate' 6import { isDislikeActivityValid, isLikeActivityValid } from './rate'
7import { isUndoActivityValid } from './undo' 7import { isUndoActivityValid } from './undo'
8import { isVideoCommentCreateActivityValid } from './video-comments' 8import { isVideoCommentCreateActivityValid, isVideoCommentDeleteActivityValid } from './video-comments'
9import { 9import {
10 isVideoFlagValid, 10 isVideoFlagValid,
11 isVideoTorrentCreateActivityValid, 11 isVideoTorrentCreateActivityValid,
@@ -70,7 +70,8 @@ function checkUpdateActivity (activity: any) {
70 70
71function checkDeleteActivity (activity: any) { 71function checkDeleteActivity (activity: any) {
72 return isVideoTorrentDeleteActivityValid(activity) || 72 return isVideoTorrentDeleteActivityValid(activity) ||
73 isActorDeleteActivityValid(activity) 73 isActorDeleteActivityValid(activity) ||
74 isVideoCommentDeleteActivityValid(activity)
74} 75}
75 76
76function checkFollowActivity (activity: any) { 77function checkFollowActivity (activity: any) {
diff --git a/server/helpers/custom-validators/activitypub/video-comments.ts b/server/helpers/custom-validators/activitypub/video-comments.ts
index 489ff27de..6928aced3 100644
--- a/server/helpers/custom-validators/activitypub/video-comments.ts
+++ b/server/helpers/custom-validators/activitypub/video-comments.ts
@@ -18,10 +18,15 @@ function isVideoCommentObjectValid (comment: any) {
18 isActivityPubUrlValid(comment.url) 18 isActivityPubUrlValid(comment.url)
19} 19}
20 20
21function isVideoCommentDeleteActivityValid (activity: any) {
22 return isBaseActivityValid(activity, 'Delete')
23}
24
21// --------------------------------------------------------------------------- 25// ---------------------------------------------------------------------------
22 26
23export { 27export {
24 isVideoCommentCreateActivityValid 28 isVideoCommentCreateActivityValid,
29 isVideoCommentDeleteActivityValid
25} 30}
26 31
27// --------------------------------------------------------------------------- 32// ---------------------------------------------------------------------------