Filter out twitter repost spam

This commit is contained in:
Max L. 2023-11-23 21:57:58 +01:00
parent de46f7c7b8
commit c76dfedac1
No known key found for this signature in database
GPG key ID: 2F963B95632B8467

View file

@ -130,7 +130,9 @@ const displayPost = function(post) {
};
const processPosts = function(posts) {
posts = posts.filter((post) => secondsAgo(new Date(post.created_at)) < maxAge);
posts = posts.filter((post) => {
return secondsAgo(new Date(post.created_at)) < maxAge && post.content.indexOf("nitter.") === -1
});
return posts;
};