From c493ffe66fb28aed184587ddf77994bbcf0caac9 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 8 Jul 2023 23:23:46 +1000 Subject: [PATCH] Only include reply webmentions on posts --- app/repos/post_repo.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/repos/post_repo.rb b/app/repos/post_repo.rb index ff663b1..ccf4456 100644 --- a/app/repos/post_repo.rb +++ b/app/repos/post_repo.rb @@ -152,6 +152,9 @@ module Adamantium .exclude(Sequel.pg_jsonb_op(:syndication_sources).has_key?("instagram")) .published .combine(:tags, :webmentions) + .node(:webmentions) { |webmention| + webmention.where(type: "reply") + } .order(Sequel.desc(:published_at)) .limit(limit) .to_a @@ -217,6 +220,9 @@ module Adamantium posts .published .combine(:tags, :trips, :webmentions) + .node(:webmentions) { |webmention| + webmention.where(type: "reply") + } .where(slug: slug) .one! end