From 07197db4c567f22bbc9c12339062896dc76bac2f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 27 Mar 2018 13:33:56 +0200 Subject: Try to refractor activities sending There is still a need for work on this part though --- server/lib/video-comment.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'server/lib/video-comment.ts') diff --git a/server/lib/video-comment.ts b/server/lib/video-comment.ts index 0d744c526..f88e5cfdf 100644 --- a/server/lib/video-comment.ts +++ b/server/lib/video-comment.ts @@ -5,7 +5,7 @@ import { AccountModel } from '../models/account/account' import { VideoModel } from '../models/video/video' import { VideoCommentModel } from '../models/video/video-comment' import { getVideoCommentActivityPubUrl } from './activitypub' -import { sendCreateVideoCommentToOrigin, sendCreateVideoCommentToVideoFollowers } from './activitypub/send' +import { sendCreateVideoComment } from './activitypub/send' async function createVideoComment (obj: { text: string, @@ -37,11 +37,7 @@ async function createVideoComment (obj: { savedComment.Video = obj.video savedComment.Account = obj.account - if (savedComment.Video.isOwned()) { - await sendCreateVideoCommentToVideoFollowers(savedComment, t) - } else { - await sendCreateVideoCommentToOrigin(savedComment, t) - } + await sendCreateVideoComment(savedComment, t) return savedComment } -- cgit v1.2.3