attachment name

This commit is contained in:
Peter Maquiran
2024-09-04 12:15:44 +01:00
parent 0f3096b25e
commit 5315d185c2
7 changed files with 13 additions and 7 deletions
@@ -25,7 +25,8 @@ export class MessageMapper {
fileName: e.fileName,
applicationId: e.applicationId || 0,
docId: Number(e.docId) || 0,
mimeType: e.mimeType
mimeType: e.mimeType,
description: e.description
}))[0] || {}
}
@@ -24,6 +24,7 @@ export class ListenSendMessageUseCase {
return this.MessageSocketRepositoryService.listenToMessages().pipe(
filter((message) => {
return message?.requestId?.startsWith(InstanceId) && message?.roomId == roomId
}),
map(message => message)
@@ -26,7 +26,7 @@ export class MessageAttachmentByMessageIdUseCase {
private AttachmentLocalDataSource: AttachmentLocalDataSource
) { }
@XTracerAsync({name:'Message-Attachment-By-MessageIdUseCase', module:'chat', bugPrint: true, waitNThrow: 5000})
@XTracerAsync({name:'Message-Attachment-By-MessageIdUseCase', module:'chat', bugPrint: true, waitNThrow: 15000})
async execute(input: MessageAttachmentByMessageIdInput, tracing?: TracingType): Promise<Result<string, any>> {
tracing.setAttribute('messageId', input.id)
@@ -36,6 +36,7 @@ export class MessageAttachmentByMessageIdUseCase {
})
if(getLocalAttachment.isOk() && getLocalAttachment.value) {
tracing.setAttribute('download', 'false')
// has blob
if(getLocalAttachment.value.file) {
@@ -39,7 +39,8 @@ export const MessageInputDTOSchema = z.object({
fileName: z.string().optional(),
applicationId: z.number().optional(),
docId: z.number().optional(),
mimeType: z.string().optional()
mimeType: z.string().optional(),
description: z.string().optional()
}).optional()
});
export type MessageInputDTO = z.infer<typeof MessageInputDTOSchema>