mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-05-15 15:08:51 +02:00
fix: remove platform exception in client-side webmention filter
Conversations items are now included in build-time rendering via conversationMentions data, so they no longer need a special exception to bypass the timestamp filter. All items (webmention.io and conversations) are now filtered equally by build timestamp.
This commit is contained in:
+2
-3
@@ -58,10 +58,9 @@
|
|||||||
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
|
// Both webmention.io and conversations items are included at build time,
|
||||||
// in the build-time cache, so always show them regardless of timestamp.
|
// so filter all by timestamp (only show items received after the build).
|
||||||
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