Merge branch 'main' into handle-timeout-error

(((updating local branch)))
This commit is contained in:
P. Reis 2024-07-02 17:31:36 -03:00
commit 1731e7dac9
3 changed files with 5 additions and 3 deletions

View file

@ -209,7 +209,9 @@ const accountStatusesController: AppController = async (c) => {
filter['#t'] = [tagged];
}
const events = await store.query([filter], { signal })
const opts = { signal, limit, timeout: 10_000 };
const events = await store.query([filter], opts)
.then((events) => hydrateEvents({ events, store, signal }))
.then((events) => {
if (exclude_replies) {

View file

@ -78,7 +78,7 @@ async function renderNotifications(
const store = c.get('store');
const pubkey = await c.get('signer')?.getPublicKey()!;
const { signal } = c.req.raw;
const opts = { signal, limit: params.limit, timeout: 10_000 };
const opts = { signal, limit: params.limit, timeout: 15_000 };
const events = await store
.query(filters, opts)

View file

@ -60,7 +60,7 @@ const suggestedTimelineController: AppController = async (c) => {
async function renderStatuses(c: AppContext, filters: NostrFilter[]) {
const { signal } = c.req.raw;
const store = c.get('store');
const opts = { signal, timeout: 5000 };
const opts = { signal, timeout: 10_000 };
const events = await store
.query(filters, opts)