mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
accountStatusesController: handle exclude_replies with NIP-50 search ext
This commit is contained in:
parent
c9dc3b198c
commit
8a9928696b
1 changed files with 11 additions and 1 deletions
|
|
@ -241,14 +241,24 @@ const accountStatusesController: AppController = async (c) => {
|
|||
limit,
|
||||
};
|
||||
|
||||
const search: string[] = [];
|
||||
|
||||
if (only_media) {
|
||||
filter.search = 'media:true';
|
||||
search.push('media:true');
|
||||
}
|
||||
|
||||
if (exclude_replies) {
|
||||
search.push('reply:false');
|
||||
}
|
||||
|
||||
if (tagged) {
|
||||
filter['#t'] = [tagged];
|
||||
}
|
||||
|
||||
if (search.length) {
|
||||
filter.search = search.join(' ');
|
||||
}
|
||||
|
||||
const opts = { signal, limit, timeout: Conf.db.timeouts.timelines };
|
||||
|
||||
const events = await store.query([filter], opts)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue