mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
remove rocket chat
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { MessageAttachmentFileType, MessageAttachmentSource } from "./messageOutputDTO";
|
||||
|
||||
export const MessageInputDTOSchema = z.object({
|
||||
roomId: z.string().uuid(),
|
||||
@@ -8,7 +9,15 @@ export const MessageInputDTOSchema = z.object({
|
||||
canEdit: z.boolean(),
|
||||
oneShot: z.boolean(),
|
||||
requireUnlock: z.boolean(),
|
||||
requestId: z.string()
|
||||
requestId: z.string(),
|
||||
attachments: z.array(z.object({
|
||||
fileType: z.nativeEnum(MessageAttachmentFileType),
|
||||
source: z.nativeEnum(MessageAttachmentSource),
|
||||
file: z.string(),
|
||||
fileName: z.string(),
|
||||
applicationId: z.string(),
|
||||
docId: z.string()
|
||||
})).optional()
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ export const MessageOutPutDataDTOSchema = z.object({
|
||||
source: z.nativeEnum(MessageAttachmentSource),
|
||||
file: z.string(),
|
||||
fileName: z.string(),
|
||||
applicationId: z.string(),
|
||||
docId: z.string()
|
||||
applicationId: z.string().optional(),
|
||||
docId: z.string().optional()
|
||||
}))
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { MessageAttachmentFileType, MessageAttachmentSource } from "../../data/dto/message/messageOutputDTO";
|
||||
|
||||
const MessageEntitySchema = z.object({
|
||||
$id: z.any().optional(),
|
||||
@@ -16,7 +17,15 @@ const MessageEntitySchema = z.object({
|
||||
wxeMail: z.string(),
|
||||
userPhoto: z.string(),
|
||||
}),
|
||||
sending: z.boolean().optional()
|
||||
sending: z.boolean().optional(),
|
||||
attachments: z.array(z.object({
|
||||
fileType: z.nativeEnum(MessageAttachmentFileType),
|
||||
source: z.nativeEnum(MessageAttachmentSource),
|
||||
file: z.string(),
|
||||
fileName: z.string(),
|
||||
applicationId: z.string(),
|
||||
docId: z.string()
|
||||
}))
|
||||
})
|
||||
|
||||
type Message = z.infer<typeof MessageEntitySchema>;
|
||||
@@ -41,6 +50,15 @@ export class MessageEntity implements Message {
|
||||
sending: boolean = false
|
||||
sendAttemp = 0
|
||||
|
||||
attachments: {
|
||||
fileType: MessageAttachmentFileType,
|
||||
source: MessageAttachmentSource,
|
||||
file: string,
|
||||
fileName: string,
|
||||
applicationId?: string,
|
||||
docId?: string
|
||||
}[]
|
||||
|
||||
constructor() {}
|
||||
|
||||
get messageStatus() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { MessageInputDTO } from "../../data/dto/message/messageInputDtO";
|
||||
import { MessageOutPutDataDTO } from "../../data/dto/message/messageOutputDTO";
|
||||
import { MessageEntity } from "../entity/message";
|
||||
import { attachments } from '../../../../../../../../../Downloads/equilibriumito-gabinete-digital-fo-23cf0fc4cbaa/equilibriumito-gabinete-digital-fo-23cf0fc4cbaa/src/app/models/beast-orm';
|
||||
|
||||
export class MessageMapper {
|
||||
static toDomain(DTO: MessageOutPutDataDTO) : MessageEntity {
|
||||
@@ -16,7 +17,8 @@ export class MessageMapper {
|
||||
requireUnlock: entity.requireUnlock,
|
||||
roomId: entity.roomId,
|
||||
senderId: entity.sender.wxUserId,
|
||||
requestId: requestId
|
||||
requestId: requestId,
|
||||
attachments: entity.attachments
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MessageDeleteLiveUseCaseService {
|
||||
public repository: MessageRepositoryService
|
||||
) { }
|
||||
|
||||
@SafeValidateSchema(MessageDeleteInputDTOSchema, 'MessageDeleteLiveUseCaseService')
|
||||
@SafeValidateSchema(MessageDeleteInputDTOSchema, 'MessageDeleteUseCaseService')
|
||||
async execute(data: MessageDeleteInputDTO) {
|
||||
return this.repository.sendMessageDelete(data)
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ export class SignalRService {
|
||||
|
||||
this.deadConnectionBackGround = new Subject()
|
||||
this.deadConnectionBackGround.pipe(
|
||||
switchMap(() => timer(300000)),
|
||||
switchMap(() => timer(150000)),
|
||||
).subscribe(() => {
|
||||
this.newConnection()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user