diff options
Diffstat (limited to 'server/controllers/bots.ts')
-rw-r--r-- | server/controllers/bots.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/server/controllers/bots.ts b/server/controllers/bots.ts index 63db345bf..9f03de7e8 100644 --- a/server/controllers/bots.ts +++ b/server/controllers/bots.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | import { getServerActor } from '@server/models/application/application' | ||
1 | import express from 'express' | 2 | import express from 'express' |
2 | import { truncate } from 'lodash' | 3 | import { truncate } from 'lodash' |
3 | import { SitemapStream, streamToPromise } from 'sitemap' | 4 | import { SitemapStream, streamToPromise } from 'sitemap' |
@@ -63,13 +64,18 @@ async function getSitemapAccountUrls () { | |||
63 | } | 64 | } |
64 | 65 | ||
65 | async function getSitemapLocalVideoUrls () { | 66 | async function getSitemapLocalVideoUrls () { |
67 | const serverActor = await getServerActor() | ||
68 | |||
66 | const { data } = await VideoModel.listForApi({ | 69 | const { data } = await VideoModel.listForApi({ |
67 | start: 0, | 70 | start: 0, |
68 | count: undefined, | 71 | count: undefined, |
69 | sort: 'createdAt', | 72 | sort: 'createdAt', |
70 | includeLocalVideos: true, | 73 | displayOnlyForFollower: { |
74 | actorId: serverActor.id, | ||
75 | orLocalVideos: true | ||
76 | }, | ||
77 | isLocal: true, | ||
71 | nsfw: buildNSFWFilter(), | 78 | nsfw: buildNSFWFilter(), |
72 | filter: 'local', | ||
73 | withFiles: false, | 79 | withFiles: false, |
74 | countVideos: false | 80 | countVideos: false |
75 | }) | 81 | }) |