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
- Add an optional boolean parameter
include_own(defaultfalse) tobridge.get_account_postsandbridge.get_account_posts_v2. Validate it like other boolean parameters (validate_json_argumentstype"boolean"). Refuse it, as an unexpected argument, for sorts other thanfeed. - In
get_account_posts_by_feed, wheninclude_own, also takehive_feed_cacherows withhfc.account_id = _account_id. Keep the existing ordering, the paging cursor (start_author/start_permlink), the muted filters and the_min_datewindow applying to those rows exactly as to followed accounts. An own post reached both ways appears once. - With
include_ownabsent or false, the query and output are unchanged.
Acceptance
- Tavern patterns:
sort=feedwithinclude_own: truefor 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_ownwithsort=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