Skip to content

Conversation

Copy link

Copilot AI commented Dec 30, 2025

Implements RSS 2.0 feed generation for comment subscriptions, enabling users to track comments via feed readers.

Changes

  • RSS feed endpoint: Added GET /api/comment?type=rss with optional url, count, and lang parameters
  • RSS dependency: Added [email protected] package for standards-compliant feed generation
  • i18n support: Detects language from lang parameter, generates localized feed titles ("评论于" vs "commented on")
  • XML response handling: RSS requests bypass JSON serialization in getAction() to return proper XML
  • Date handling: Preserves insertedAt Date objects through formatting pipeline for accurate RSS timestamps
  • URL fallback: Graceful degradation when protocol/host unavailable in request context

Usage

GET /api/comment?type=rss&count=20&url=/post/article&lang=zh-cn

Returns RSS 2.0 XML with:

  • Comment author, rendered HTML content
  • Article URL with comment anchor (#objectId)
  • Publication date, unique GUID
  • Max 100 items, approved comments only

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • metadata.tencentyun.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/waline/waline/packages/server/development.js 9090 (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/waline/waline/packages/server/development.js 9191 (dns block)
  • oauth.lithub.cc
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/waline/waline/packages/server/development.js 9191 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

帮我提个 PR,让 Server 评论返回支持 RSS 功能


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 30, 2025
Copilot AI changed the title [WIP] Add RSS support for server comments return feat(server): add RSS feed support for comment subscriptions Dec 30, 2025
Copilot AI requested a review from lizheming December 30, 2025 13:53
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.

2 participants