this.videoService.updateVideo(video)
.subscribe(
() => {
+ this.isUploadingVideo = false
this.notificationsService.success('Success', 'Video published.')
this.router.navigate([ '/videos/watch', video.uuid ])
},
import * as validator from 'validator'
-import { exists, isDateValid } from '../misc'
+import { ACTIVITY_PUB } from '../../../initializers'
+import { exists, isArray, isDateValid } from '../misc'
import { isActivityPubUrlValid, isBaseActivityValid } from './misc'
function isVideoCommentCreateActivityValid (activity: any) {
isCommentContentValid(comment.content) &&
isActivityPubUrlValid(comment.inReplyTo) &&
isDateValid(comment.published) &&
- isActivityPubUrlValid(comment.url)
+ isActivityPubUrlValid(comment.url) &&
+ isArray(comment.to) &&
+ comment.to.indexOf(ACTIVITY_PUB.PUBLIC) !== -1 // Only accept public comments
}
function isVideoCommentDeleteActivityValid (activity: any) {