X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fmoderation.ts;h=456b615b22bf08cbae488e2382036b6e228b2a64;hb=51353d9a035fb6b81f903a8b5f391292841649fd;hp=0cefe1648faf2a7d61621a2561952ab424bfd066;hpb=4d7ce9218a3f695bf3d013cbdce1c5c6a5221927;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/moderation.ts b/server/lib/moderation.ts index 0cefe1648..456b615b2 100644 --- a/server/lib/moderation.ts +++ b/server/lib/moderation.ts @@ -23,7 +23,7 @@ import { ActivityCreate } from '../../shared/models/activitypub' import { VideoObject } from '../../shared/models/activitypub/objects' import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object' import { LiveVideoCreate, VideoCreate, VideoImportCreate } from '../../shared/models/videos' -import { VideoCommentCreate } from '../../shared/models/videos/comment/video-comment.model' +import { VideoCommentCreate } from '../../shared/models/videos/comment' import { ActorModel } from '../models/actor/actor' import { UserModel } from '../models/user/user' import { VideoModel } from '../models/video/video' @@ -170,8 +170,8 @@ function createAccountAbuse (options: { }) { const { baseAbuse, accountInstance, transaction, reporterAccount } = options - const associateFun = async () => { - return { isOwned: accountInstance.isOwned() } + const associateFun = () => { + return Promise.resolve({ isOwned: accountInstance.isOwned() }) } return createAbuse({ @@ -221,7 +221,7 @@ async function createAbuse (options: { const { isOwned } = await associateFun(abuseInstance) if (isOwned === false) { - await sendAbuse(reporterAccount.Actor, abuseInstance, abuseInstance.FlaggedAccount, transaction) + sendAbuse(reporterAccount.Actor, abuseInstance, abuseInstance.FlaggedAccount, transaction) } const abuseJSON = abuseInstance.toFormattedAdminJSON()