Skip to content

Add InitialFetchCount and Onward Date to populate Forums#91

Open
talDoFlemis wants to merge 10 commits intoQolors:masterfrom
talDoFlemis:master
Open

Add InitialFetchCount and Onward Date to populate Forums#91
talDoFlemis wants to merge 10 commits intoQolors:masterfrom
talDoFlemis:master

Conversation

@talDoFlemis
Copy link

@talDoFlemis talDoFlemis commented Nov 19, 2025

Overview

This PR introduces a new optional feature that allows FeedCord to backfill recent posts when a feed worker first initializes. This is useful for populating a Discord channel with recent content when setting up a new feed instance, rather than only posting new items that arrive after initialization.

New Features

1. Initial Fetch Count (InitialFetchCount)

A new optional configuration property that specifies how many of the most recent posts to fetch when the feed worker first initializes.

Default Value: 0 (disabled)

2. Onward Date Filter (OnwardDate)

A new optional configuration property that works in conjunction with InitialFetchCount to filter posts by publish date.

Default Value: null (no date filtering)

Configuration Examples

Example 1: Basic Initial Fetch

Fetch the last 10 posts without date filtering:

{
  "Instances": [
    {
      "Id": "Tech News",
      "YoutubeUrls": [""],
      "RssUrls": ["https://example.com/feed.rss"],
      "DiscordWebhookUrl": "https://discord.com/api/webhooks/...",
      "RssCheckIntervalMinutes": 15,
      "Color": 8411391,
      "DescriptionLimit": 500,
      "Forum": true,
      "MarkdownFormat": false,
      "PersistenceOnShutdown": true,
      "InitialFetchCount": 10
    }
  ],
  "ConcurrentRequests": 40
}

Example 2: Date-Filtered Initial Fetch

Fetch up to 20 recent posts, but only those published after November 1st, 2025:

{
  "Instances": [
    {
      "Id": "Tech News",
      "YoutubeUrls": [""],
      "RssUrls": ["https://example.com/feed.rss"],
      "DiscordWebhookUrl": "https://discord.com/api/webhooks/...",
      "RssCheckIntervalMinutes": 15,
      "Color": 8411391,
      "DescriptionLimit": 500,
      "Forum": true,
      "MarkdownFormat": false,
      "PersistenceOnShutdown": true,
      "InitialFetchCount": 20,
      "OnwardDate": "2025-11-01T00:00:00"
    }
  ],
  "ConcurrentRequests": 40
}

Example 3: Default Behavior (No Backfill)

When InitialFetchCount is omitted or set to 0, FeedCord operates as it always has:

{
  "Instances": [
    {
      "Id": "Tech News",
      "YoutubeUrls": [""],
      "RssUrls": ["https://example.com/feed.rss"],
      "DiscordWebhookUrl": "https://discord.com/api/webhooks/...",
      "RssCheckIntervalMinutes": 15,
      "Color": 8411391,
      "DescriptionLimit": 500,
      "Forum": true,
      "MarkdownFormat": false,
      "PersistenceOnShutdown": true
    }
  ],
  "ConcurrentRequests": 40
}

Documentation Updates

  • Updated README.md with the new properties in the configuration example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant