From a6a7b169fa9c1fb814cebb0a6deccc7e8e6754dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olav=20Sundf=C3=B8r?= Date: Tue, 30 Sep 2025 13:49:37 +0200 Subject: [PATCH] Remove promotion at start of description It's a bit intense. --- lib/rss.test.ts | 9 +++++++++ lib/rss.ts | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/rss.test.ts b/lib/rss.test.ts index 2247bf1..4a9a6f2 100644 --- a/lib/rss.test.ts +++ b/lib/rss.test.ts @@ -47,3 +47,12 @@ Deno.test("generated rss contains promo with link to donations page", () => { "First promotion should come before the second", ); }); + +Deno.test("first promotion is removed", () => { + const series = testUtils.generateSeries(); + const feed = rss.assembleFeed(series); + const indexOfFirstPromotion = feed.indexOf( + "NRSS er avhengig av din Vipps-støtte", + ); + assertEquals(indexOfFirstPromotion, -1, "First promotion should be removed"); +}); diff --git a/lib/rss.ts b/lib/rss.ts index 812ac11..c4117d1 100644 --- a/lib/rss.ts +++ b/lib/rss.ts @@ -53,11 +53,10 @@ function assembleFeed(series: Series): string { } function descriptionWithDonationPromotion(description: string): string { - const firstPromotion = `⬇️NRSS er avhengig av din Vipps-støtte⬇️`; - const secondPromotion = + const promotion = `Takk for at du bruker NRSS 🙏🌟 Vurder å støtte utviklingen via Vipps med omtrent det samme som prisen på en kaffekopp. Se mer på https://nrss.deno.dev/`; - return `${firstPromotion}\n\n${description}\n\n${secondPromotion}`; + return `${description}\n\n${promotion}`; } function assembleEpisode(episode: Episode, seriesId: Series["id"]): Tag { -- 2.40.1