Fix db/events test, remove unnecessary AbortSignal from pipeline
This commit is contained in:
parent
3472428da8
commit
38238cc4a8
|
@ -42,9 +42,9 @@ Deno.test('query events with local filter', async () => {
|
|||
username: 'alex',
|
||||
pubkey: event1.pubkey,
|
||||
inserted_at: new Date(),
|
||||
admin: 0,
|
||||
admin: false,
|
||||
});
|
||||
|
||||
assertEquals(await db.getEvents([{ local: true }]), [event1]);
|
||||
assertEquals(await db.getEvents([{ local: false }]), []);
|
||||
assertEquals(await db.getEvents([{ kinds: [1], local: true }]), [event1]);
|
||||
assertEquals(await db.getEvents([{ kinds: [1], local: false }]), []);
|
||||
});
|
||||
|
|
|
@ -71,7 +71,7 @@ async function storeEvent(event: Event, data: EventData, opts: StoreEventOpts =
|
|||
if (force || data.user || isAdminEvent(event) || await isLocallyFollowed(event.pubkey)) {
|
||||
const [deletion] = await eventsDB.getEvents(
|
||||
[{ kinds: [5], authors: [event.pubkey], '#e': [event.id], limit: 1 }],
|
||||
{ limit: 1, signal: AbortSignal.timeout(Time.seconds(1)) },
|
||||
{ limit: 1 },
|
||||
);
|
||||
|
||||
if (deletion) {
|
||||
|
|
Loading…
Reference in New Issue