feed: render only notes from the past
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details

some notes have a created at field that is 1 year in the future,
these are always shown on to of the feed. changed to only render
notes that are from the past.
pull/63/head
OFF0 1 year ago
parent c2db08c7dc
commit 4a68940681
Signed by: offbyn
GPG Key ID: 94A2F643C51F37FA

@ -324,7 +324,10 @@ const sortByCreatedAt = (evt1, evt2) => {
};
function renderFeed() {
const now = Math.floor(Date.now() * 0.001);
const sortedFeeds = textNoteList
// dont render notes from the future
.filter(note => note.created_at < now)
.filter(note => !fitlerDifficulty || note.tags.some(([tag, , commitment]) => tag === 'nonce' && commitment >= fitlerDifficulty))
.sort(sortByCreatedAt).reverse();
sortedFeeds.forEach((evt, i) => {

Loading…
Cancel
Save