mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-05-15 06:58:50 +02:00
fix: show conversations reactions on individual post pages
Conversations items (from Mastodon/Bluesky/ActivityPub) were filtered out by the client-side timestamp check that prevents duplicating build-time webmentions. Since conversations data is never in the build-time cache, bypass the filter for items with a platform field.
This commit is contained in:
+4
-1
@@ -57,8 +57,11 @@
|
|||||||
|
|
||||||
let mentionsToShow;
|
let mentionsToShow;
|
||||||
if (hasBuildTimeSection) {
|
if (hasBuildTimeSection) {
|
||||||
// Build-time section exists - only show NEW webmentions to avoid duplicates
|
// Build-time section exists - only show NEW webmentions to avoid duplicates.
|
||||||
|
// Conversations items (which have a 'platform' field) are never included
|
||||||
|
// in the build-time cache, so always show them regardless of timestamp.
|
||||||
mentionsToShow = allChildren.filter((wm) => {
|
mentionsToShow = allChildren.filter((wm) => {
|
||||||
|
if (wm.platform) return true;
|
||||||
const wmTime = new Date(wm['wm-received']).getTime();
|
const wmTime = new Date(wm['wm-received']).getTime();
|
||||||
return wmTime > buildTime;
|
return wmTime > buildTime;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user