Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/server/src/domains/addresses/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const addressSchema = z
id: z.uuid(),
channel: channelKindSchema,
value: z.string().describe("The agent's address on the channel"),
name: z
.string()
.nullable()
.describe("Null: an address on this server goes by its value, which people know it by"),
domainId: z.uuid().nullable().describe("Null: the server has no domains of its own"),
primary: z.boolean().describe("Whether new messages on its channel go out from it"),
createdAt: z.date(),
Expand All @@ -25,5 +29,5 @@ export const addressSchema = z
type Address = z.infer<typeof addressSchema>;

export function toAddress({ id, channel, value, createdAt }: AddressRecord): Address {
return { id, channel, value, domainId: null, primary: true, createdAt };
return { id, channel, value, name: null, domainId: null, primary: true, createdAt };
}
Loading