Exclude instagram posts from statuses

This commit is contained in:
2023-02-28 20:57:56 +11:00
parent 5bee222601
commit a2d3f5efcf
2 changed files with 11 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
module Adamantium
module Repos
class PostRepo < Adamantium::Repo[:posts]
Sequel.extension :pg_json
Sequel.extension :pg_json_ops
commands update: :by_pk
@@ -97,6 +98,7 @@ module Adamantium
def statuses_listing(limit: nil)
posts
.where(post_type: "post", name: nil)
.exclude(Sequel.pg_jsonb_op(:syndication_sources).has_key?("instagram"))
.published
.combine(:tags)
.order(Sequel.desc(:published_at))