J M Rossy 2 months ago committed by GitHub
parent 3d0674decf
commit 38769a77bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      src/features/messages/queries/parse.ts
  2. 2
      src/features/messages/queries/useMessageQuery.ts

@ -31,7 +31,9 @@ export function parseMessageStubResult(
.flat()
.map((m) => parseMessageStub(multiProvider, scrapedChains, m))
.filter((m): m is MessageStub => !!m)
.sort((a, b) => b.origin.timestamp - a.origin.timestamp);
.sort((a, b) => b.origin.timestamp - a.origin.timestamp)
.filter((m) => Date.now() - m.origin.timestamp < 1000 * 60 * 60) // filter out messages older than 1 hour
.slice(0, 20);
}
export function parseMessageQueryResult(

@ -18,7 +18,7 @@ import { parseMessageQueryResult, parseMessageStubResult } from './parse';
const SEARCH_AUTO_REFRESH_DELAY = 15_000; // 15s
const MSG_AUTO_REFRESH_DELAY = 10_000; // 10s
const LATEST_QUERY_LIMIT = 20;
const LATEST_QUERY_LIMIT = 100;
const SEARCH_QUERY_LIMIT = 50;
export function isValidSearchQuery(input: string, allowAddress?: boolean) {

Loading…
Cancel
Save