]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video.ts
Add ability to mute a user/instance by server in client
[github/Chocobozzz/PeerTube.git] / server / models / video / video.ts
index eab99cba7eeaa575592622512b99adbe007a4b71..6c183933b165452829000d5a65c6dd6dfa5678af 100644 (file)
@@ -1255,9 +1255,11 @@ export class VideoModel extends Model<VideoModel> {
 
   // threshold corresponds to how many video the field should have to be returned
   static async getRandomFieldSamples (field: 'category' | 'channelId', threshold: number, count: number) {
-    const actorId = (await getServerActor()).id
+    const serverActor = await getServerActor()
+    const actorId = serverActor.id
 
-    const scopeOptions = {
+    const scopeOptions: AvailableForListIDsOptions = {
+      serverAccountId: serverActor.Account.id,
       actorId,
       includeLocalVideos: true
     }