]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/bots.ts
Move test functions outside extra-utils
[github/Chocobozzz/PeerTube.git] / server / controllers / bots.ts
index 63db345bfe0ce0c866fa0d07a7bf366e6a6aa7c4..2a8d6863a08672bc116a82773e262020ea7820a2 100644 (file)
@@ -1,3 +1,4 @@
+import { getServerActor } from '@server/models/application/application'
 import express from 'express'
 import { truncate } from 'lodash'
 import { SitemapStream, streamToPromise } from 'sitemap'
@@ -63,14 +64,18 @@ async function getSitemapAccountUrls () {
 }
 
 async function getSitemapLocalVideoUrls () {
+  const serverActor = await getServerActor()
+
   const { data } = await VideoModel.listForApi({
     start: 0,
     count: undefined,
     sort: 'createdAt',
-    includeLocalVideos: true,
+    displayOnlyForFollower: {
+      actorId: serverActor.id,
+      orLocalVideos: true
+    },
+    isLocal: true,
     nsfw: buildNSFWFilter(),
-    filter: 'local',
-    withFiles: false,
     countVideos: false
   })