mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix donwload attachment and modal to edit message
This commit is contained in:
@@ -14,14 +14,18 @@ export enum MessageAttachmentFileType {
|
||||
Video
|
||||
}
|
||||
|
||||
export enum IMessageType {
|
||||
normal =1,
|
||||
information
|
||||
}
|
||||
|
||||
export const MessageEntitySchema = z.object({
|
||||
$id: z.any().optional(),
|
||||
id: z.string().optional(),
|
||||
roomId: z.string().uuid().optional(),
|
||||
receiverId: z.number().optional(),
|
||||
message: z.string().optional(),
|
||||
messageType: z.number(),
|
||||
message: z.string().nullable().optional(),
|
||||
messageType: z.nativeEnum(IMessageType),
|
||||
canEdit: z.boolean(),
|
||||
oneShot: z.boolean(),
|
||||
sentAt: z.string().optional(),
|
||||
@@ -56,7 +60,7 @@ export const MessageEntitySchema = z.object({
|
||||
id: z.string().optional(),
|
||||
mimeType: z.string().optional(),
|
||||
safeFile: z.any().optional(),
|
||||
description: z.string().optional()
|
||||
description: z.string().nullable().optional()
|
||||
})).optional()
|
||||
})
|
||||
|
||||
@@ -69,7 +73,6 @@ export class MessageEntity {
|
||||
roomId?: string
|
||||
receiverId?: number
|
||||
message?: string
|
||||
messageType: number = 0
|
||||
canEdit: boolean = false
|
||||
oneShot: boolean = false
|
||||
sentAt?: string
|
||||
@@ -78,7 +81,7 @@ export class MessageEntity {
|
||||
sender!: typeof MessageEntitySchema._type.sender
|
||||
sending: boolean = false
|
||||
sendAttemp = 0
|
||||
|
||||
messageType = IMessageType.normal
|
||||
attachments: typeof MessageEntitySchema._type.attachments = []
|
||||
reactions: typeof MessageEntitySchema._type.reactions = []
|
||||
requestId!: string
|
||||
|
||||
Reference in New Issue
Block a user