Add replies to posts

This commit is contained in:
2024-03-22 08:48:21 +11:00
parent 6a5ff26948
commit a2c11de10f
12 changed files with 55 additions and 6 deletions

View File

@@ -192,6 +192,17 @@ module Main
.one!
end
def fetch(slug)
posts
.published
.combine(:tags, :trips, :webmentions)
.node(:webmentions) { |webmention|
webmention.published.where(type: "reply")
}
.where(slug: slug)
.one
end
def find!(id)
posts
.by_pk(id)