diff --git a/src/controllers/api/accounts.ts b/src/controllers/api/accounts.ts index 23f3190d..40b3e7b6 100644 --- a/src/controllers/api/accounts.ts +++ b/src/controllers/api/accounts.ts @@ -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)