From fb0c576faa27b4145b3e7919d8ae684498c3bfad Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 29 Jun 2026 05:42:19 +0000 Subject: [PATCH] Add dc:creator author name to RSS feed items Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01TGxmeHZ1DY7jE61qZPjYTu --- Sources/App/FeedController/RSSFeedController.swift | 3 ++- Tests/AppTests/FeedTests.swift | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Sources/App/FeedController/RSSFeedController.swift b/Sources/App/FeedController/RSSFeedController.swift index a73e924..4f88e1b 100644 --- a/Sources/App/FeedController/RSSFeedController.swift +++ b/Sources/App/FeedController/RSSFeedController.swift @@ -55,7 +55,7 @@ extension RSSFeedController { private func buildRSSXML(posts: [FeedPost]) -> String { var xml = """ - + Michael Nisi https://michaelnisi.com @@ -79,6 +79,7 @@ extension RSSFeedController { \(post.url) \(post.url) \(pubDate) + Michael Nisi \(post.description.xmlEscaped) diff --git a/Tests/AppTests/FeedTests.swift b/Tests/AppTests/FeedTests.swift index 52d8685..d5bf9a2 100644 --- a/Tests/AppTests/FeedTests.swift +++ b/Tests/AppTests/FeedTests.swift @@ -124,6 +124,17 @@ struct FeedTests { } } + @Test("GET /feed items include dc:creator author name") + func rssFeedItemsIncludeAuthor() async throws { + let app = try await buildApplication(TestArguments()) + try await app.test(.router) { client in + try await client.execute(uri: "/feed", method: .get) { response in + let body = String(buffer: response.body) + #expect(body.contains("Michael Nisi")) + } + } + } + @Test("GET /feed with If-None-Match returns 304") func rssFeedConditionalGet() async throws { let app = try await buildApplication(TestArguments())