mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
realtime
This commit is contained in:
@@ -21,11 +21,15 @@ const MessageEntitySchema = z.object({
|
||||
attachments: z.array(z.object({
|
||||
fileType: z.nativeEnum(MessageAttachmentFileType),
|
||||
source: z.nativeEnum(MessageAttachmentSource),
|
||||
file: z.string().optional(),
|
||||
fileName: z.string().optional(),
|
||||
applicationId: z.string().optional(),
|
||||
docId: z.string().optional()
|
||||
})),
|
||||
attachmentsSource: z.array(z.object({
|
||||
file: z.string(),
|
||||
fileName: z.string(),
|
||||
applicationId: z.string(),
|
||||
docId: z.string()
|
||||
}))
|
||||
id: z.string(),
|
||||
})),
|
||||
})
|
||||
|
||||
type Message = z.infer<typeof MessageEntitySchema>;
|
||||
@@ -56,8 +60,19 @@ export class MessageEntity implements Message {
|
||||
file?: string,
|
||||
fileName: string,
|
||||
applicationId?: string,
|
||||
docId?: string
|
||||
}[]
|
||||
docId?: string,
|
||||
mimeType?: string,
|
||||
description?: string
|
||||
}[] = []
|
||||
|
||||
attachmentsSource: {
|
||||
id: string,
|
||||
file: string
|
||||
}[] = []
|
||||
|
||||
reactions = []
|
||||
|
||||
requestId: string
|
||||
|
||||
constructor() {}
|
||||
|
||||
@@ -67,4 +82,8 @@ export class MessageEntity implements Message {
|
||||
}
|
||||
}
|
||||
|
||||
get hasAttachment() {
|
||||
return this.attachments.length >= 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user