mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +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
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { DataSourceReturn } from "src/app/services/Repositorys/type";
|
||||
import { IMessageGetAllByRoomIdOutPut } from "../../usecase/message/message-get-all-by-room-Id";
|
||||
|
||||
export abstract class IAttachmentRemoteRepository {
|
||||
abstract getAttachment(id: string | number): DataSourceReturn<Blob>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { MessageTable } from "src/app/infra/database/dexie/instance/chat/schema/message";
|
||||
import { DexieRepository } from "src/app/infra/repository/dexie/dexie-repository.service";
|
||||
import { MessageEntity } from "../../entity/message";
|
||||
import { Observable as DexieObservable, PromiseExtended } from 'Dexie';
|
||||
import { AttachmentTable } from "src/app/infra/database/dexie/instance/chat/schema/attachment";
|
||||
import { Result } from "neverthrow";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { DataSourceReturn } from "src/app/services/Repositorys/type";
|
||||
import { IMessageGetAllByRoomIdOutPut } from "../../usecase/message/message-get-all-by-room-Id";
|
||||
import { Observable } from "rxjs";
|
||||
import { Result } from "neverthrow";
|
||||
import { UserTypingDTO } from "src/app/module/chat/data/repository/typing/user-typing-live-data-source.service";
|
||||
|
||||
Reference in New Issue
Block a user