mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
attachment name
This commit is contained in:
@@ -131,7 +131,6 @@ export class SignalRConnection {
|
||||
input?.data?.roomName == message?.data.roomName && typeof input?.data?.roomName == 'string'
|
||||
|
||||
}),
|
||||
first()
|
||||
).subscribe(value => {
|
||||
resolve(ok(value.data as unknown as T))
|
||||
// console.log('Received valid value:', value);
|
||||
|
||||
@@ -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)
|
||||
|
||||
+2
-1
@@ -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>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<audio [src]="attachment.safeFile|safehtml" preload="metadata" class="flex-grow-1" controls controlsList="nodownload noplaybackrate"></audio>
|
||||
</div>
|
||||
|
||||
<div *ngIf="attachment.fileType == MessageAttachmentFileType.Doc">
|
||||
<div *ngIf="attachment.fileType == MessageAttachmentFileType.Doc" class="d-flex">
|
||||
<fa-icon *ngIf="attachment.mimeType == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||
<fa-icon *ngIf="attachment.mimeType == 'application/word'" icon="file-word" class="word-icon">
|
||||
</fa-icon>
|
||||
@@ -110,7 +110,7 @@
|
||||
<ion-icon *ngIf="attachment.mimeType == 'application/meeting'" src="assets/icon/webtrix.svg">
|
||||
</ion-icon>
|
||||
|
||||
<ion-label>{{ attachment.fileName}}</ion-label>
|
||||
<ion-label>{{ attachment?.fileName || attachment?.description }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1061,6 +1061,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
const data = res.data;
|
||||
|
||||
console.log(data)
|
||||
|
||||
if (data.selected) {
|
||||
|
||||
// "title": res.data.selected.Assunto,
|
||||
@@ -1084,6 +1086,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
fileType: MessageAttachmentFileType.Doc,
|
||||
applicationId: res.data.selected.ApplicationType,
|
||||
docId: res.data.selected.Id,
|
||||
description: res.data.selected.Assunto
|
||||
}]
|
||||
|
||||
const date = whatsappDate(message.sentAt, false)
|
||||
@@ -1093,7 +1096,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
this.messages1[this.roomId].push(Ballon)
|
||||
}
|
||||
|
||||
this.messages1[this.roomId].push(new MessageViewModal(message))
|
||||
this.messages1[this.roomId].push(message)
|
||||
setTimeout(() => {
|
||||
this.scrollToBottomClicked()
|
||||
}, 100)
|
||||
|
||||
Reference in New Issue
Block a user