Merge branch 'exclude-replies-index' into 'main'

accountStatusesController: handle exclude_replies with NIP-50 search ext

See merge request soapbox-pub/ditto!647
This commit is contained in:
Alex Gleason 2025-02-10 23:01:39 +00:00
commit 9e7aeda364

View file

@ -241,14 +241,24 @@ const accountStatusesController: AppController = async (c) => {
limit, limit,
}; };
const search: string[] = [];
if (only_media) { if (only_media) {
filter.search = 'media:true'; search.push('media:true');
}
if (exclude_replies) {
search.push('reply:false');
} }
if (tagged) { if (tagged) {
filter['#t'] = [tagged]; filter['#t'] = [tagged];
} }
if (search.length) {
filter.search = search.join(' ');
}
const opts = { signal, limit, timeout: Conf.db.timeouts.timelines }; const opts = { signal, limit, timeout: Conf.db.timeouts.timelines };
const events = await store.query([filter], opts) const events = await store.query([filter], opts)