Include own account's posts within feed

Problem

bridge.get_account_posts with sort=feed shows only the posts of accounts the user follows. The feed query in postgrest/utilities/get_account_posts.sql (get_account_posts_by_feed, ≈l.193-280) joins hive_feed_cache to follows on hfc.account_id = f.following. A user's own posts appear only if they follow themselves, which no front end offers as a real UX path. Front ends want an opt-in way to include them.

Fix

  1. Add an optional boolean parameter include_own (default false) to bridge.get_account_posts and bridge.get_account_posts_v2. Validate it like other boolean parameters (validate_json_arguments type "boolean"). Refuse it, as an unexpected argument, for sorts other than feed.
  2. In get_account_posts_by_feed, when include_own, also take hive_feed_cache rows with hfc.account_id = _account_id. Keep the existing ordering, the paging cursor (start_author/start_permlink), the muted filters and the _min_date window applying to those rows exactly as to followed accounts. An own post reached both ways appears once.
  3. With include_own absent or false, the query and output are unchanged.

Acceptance

  • Tavern patterns:
    • sort=feed with include_own: true for a mock-data account that has posts and follows others. The expected result contains its own posts in date order among the followed ones;
    • a paging pattern across a page boundary;
    • a negative pattern for include_own with sort=blog.
  • Existing feed patterns are unchanged.
  • AIDEV's install step passes.
Original description (rewritten 2026-10-09 into an implementation spec for an AIDEV workflow)

Theoretically one can already follow oneself, which should include the own posts within the feed. (Haven't tested it) But that's not really possible from a frontend, as that shouldn't be a real UX path.

It would be great if the own posts can be included within the feed. Not everyone might need this, so it could be toggled via parameter.

Edited by Dan Notestein