Add mixer module to combine results from DB and pool

This commit is contained in:
Alex Gleason
2023-08-16 16:12:27 -05:00
parent 59b7a3eed8
commit d4721fb82d
4 changed files with 91 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
import { type AppController } from '@/app.ts';
import { type Filter, findReplyTag, z } from '@/deps.ts';
import { getAuthor, getFilter, getFollows, publish } from '@/client.ts';
import { getAuthor, getFollows, publish } from '@/client.ts';
import { getFilters } from '@/mixer.ts';
import { jsonMetaContentSchema } from '@/schemas/nostr.ts';
import { signEvent } from '@/sign.ts';
import { toAccount, toStatus } from '@/transformers/nostr-to-mastoapi.ts';
@@ -115,7 +116,7 @@ const accountStatusesController: AppController = async (c) => {
filter['#t'] = [tagged];
}
let events = await getFilter(filter);
let events = await getFilters([filter]);
events.sort(eventDateComparator);
if (exclude_replies) {