···2828 repost,
2929 like,
3030 bookmarked: data.bookmarked,
3131- thread_muted: false, // todo when we have thread mutes
3131+ thread_muted: data.thread_muted,
3232 reply_disabled: false,
3333 embedding_disabled: data.embed_disabled && !is_me, // poster can always bypass embed disabled.
3434 pinned: data.pinned,
+4-2
crates/parakeet/src/sql/post_state.sql
···55 l.rkey as like_rkey,
66 r.rkey as repost_rkey,
77 b.did is not null as bookmarked,
88+ tm.did is not null as thread_muted,
89 coalesce(pg.rules && ARRAY ['app.bsky.feed.postgate#disableRule'], false) as embed_disabled
910 from posts p
1011 left join likes l on l.subject = p.at_uri and l.did = $1
1112 left join reposts r on r.post = p.at_uri and r.did = $1
1213 left join bookmarks b on b.subject = p.at_uri and b.did = $1
1314 left join postgates pg on pg.post_uri = p.at_uri
1515+ left join thread_mutes tm on tm.thread = coalesce(p.root_uri, p.at_uri)
1416 where p.at_uri = any ($2)
1515- and (l.rkey is not null or r.rkey is not null or b.did is not null or pg.rules is not null)) bq,
1616- (select pinned_uri, pinned_cid from profiles where did = $1) pp;1717+ and (l.rkey is not null or r.rkey is not null or b.did is not null or tm.did is not null or pg.rules is not null)) bq,
1818+ (select pinned_uri, pinned_cid from profiles where did = $1) pp;
···11+create table thread_mutes
22+(
33+ did text not null references actors (did),
44+ thread text not null,
55+ created_at timestamptz not null default now(),
66+77+ primary key (did, thread)
88+);
99+1010+create index threadmutes_list_index on thread_mutes (thread);