Compare commits

...

1 Commits

Author SHA1 Message Date
Olav Sundfør a6a7b169fa Remove promotion at start of description
It's a bit intense.
2025-09-30 13:50:56 +02:00
2 changed files with 11 additions and 3 deletions

View File

@ -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");
});

View File

@ -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 {