mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
microFilterSchema: allow limit property
This commit is contained in:
parent
3557102b08
commit
b1309c4ec3
1 changed files with 6 additions and 2 deletions
|
|
@ -40,8 +40,12 @@ function getMicroFilters(event: NostrEvent): MicroFilter[] {
|
||||||
|
|
||||||
/** Microfilter schema. */
|
/** Microfilter schema. */
|
||||||
const microFilterSchema = z.union([
|
const microFilterSchema = z.union([
|
||||||
z.object({ ids: z.tuple([nostrIdSchema]) }).strict(),
|
z.object({ ids: z.tuple([nostrIdSchema]), limit: z.number().optional() }).strict(),
|
||||||
z.object({ kinds: z.tuple([z.literal(0)]), authors: z.tuple([nostrIdSchema]) }).strict(),
|
z.object({
|
||||||
|
kinds: z.tuple([z.literal(0)]),
|
||||||
|
authors: z.tuple([nostrIdSchema]),
|
||||||
|
limit: z.number().optional(),
|
||||||
|
}).strict(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** Checks whether the filter is a microfilter. */
|
/** Checks whether the filter is a microfilter. */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue