feat(rss-feed): add configurable description max length (#7051)
Co-authored-by: ajnart <thomas@ajnart.dev>
This commit is contained in:
1 parent
a7fac57d62
commit
68238fa69b
6 files changed
+21
-1
No files matched your search
@@ -11,10 +11,11 @@ const logger = createLogger({ module: "rssFeedsRequestHandler" });
|
||||
|
||||
export const rssFeedsRequestHandler = createWidgetRequestHandler({
|
||||
// Authorized editors can supply arbitrary URLs, so keep this cache process-local and bounded.
|
||||
async requestAsync(input: { url: string; count: number }, signal) {
|
||||
async requestAsync(input: { url: string; count: number; descriptionMaxLength: number }, signal) {
|
||||
const result = (await extract(
|
||||
input.url,
|
||||
{
|
||||
descriptionMaxLen: input.descriptionMaxLength,
|
||||
getExtraEntryFields: (feedEntry) => {
|
||||
const media = attemptGetImageFromEntry(input.url, feedEntry);
|
||||
if (!media) {
|
||||
|
||||
Reference in new issue
Block a user