More backup export improvements

This commit is contained in:
trevor-signal
2026-03-16 13:20:53 -07:00
committed by GitHub
parent b45db69a03
commit 8d6738127a
3 changed files with 201 additions and 48 deletions

View File

@@ -877,19 +877,15 @@ const bodyRangeOffsetSchema = z.number().int().min(0);
const bodyRangeStyleSchema = z.nativeEnum(signalservice.BodyRange.Style);
export const bodyRangeSchema = z.union([
z
.object({
start: bodyRangeOffsetSchema,
length: bodyRangeOffsetSchema,
mentionAci: aciSchema,
})
.strict(),
z
.object({
start: bodyRangeOffsetSchema,
length: bodyRangeOffsetSchema,
style: bodyRangeStyleSchema,
spoilerId: z.number().optional(),
})
.strict(),
z.object({
start: bodyRangeOffsetSchema,
length: bodyRangeOffsetSchema,
mentionAci: aciSchema,
}),
z.object({
start: bodyRangeOffsetSchema,
length: bodyRangeOffsetSchema,
style: bodyRangeStyleSchema,
spoilerId: z.number().optional(),
}),
]);