+
+async function isRemoteCommentAccepted (comment: MComment) {
+ // Already created
+ if (comment.id) return true
+
+ const acceptParameters = {
+ comment
+ }
+
+ const acceptedResult = await Hooks.wrapFun(
+ isRemoteVideoCommentAccepted,
+ acceptParameters,
+ 'filter:activity-pub.remote-video-comment.create.accept.result'
+ )
+
+ if (!acceptedResult || acceptedResult.accepted !== true) {
+ logger.info('Refused to create a remote comment.', { acceptedResult, acceptParameters })
+
+ return false
+ }
+
+ return true
+}