decentralised sync engine

refactor: did differentiation

serenity c4ae38ef c9466b3d

Changed files
+7
src
+5
src/lib/types/atproto.ts
···
+
import { z } from "zod";
+
+
export const didPlcSchema = z.templateLiteral(["did:plc:", z.string()]);
+
+
export type DidPlc = z.infer<typeof didPlcSchema>;
+2
src/lib/types/messages.ts
···
+
import { didPlcSchema } from "@/lib/types/atproto";
import { z } from "zod";
export const websocketMessageSchema = z.object({
···
export const shardMessageSchema = websocketMessageSchema.extend({
type: z.literal("shard/message"),
text: z.string(),
+
did: didPlcSchema,
timestamp: z.coerce.date(),
});