fix chat send attchment

This commit is contained in:
peter.maquiran
2025-09-07 10:12:05 +01:00
parent 0d10ee98fa
commit 69e4334ebf
30 changed files with 344 additions and 683 deletions
@@ -876,7 +876,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.messages1[this.room.$id].push(message)
let sendMessage = this.chatServiceService.sendMessage(message, this.roomType)
this.messageResult(sendMessage)
//this.messageResult(sendMessage)
setTimeout(() => {
this.scrollToBottomClicked()
@@ -911,7 +911,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.scrollToBottomClicked()
}, 100)
let sendMessage = this.chatServiceService.sendMessage(message, this.roomType)
this.messageResult(sendMessage)
//this.messageResult(sendMessage)
}
@@ -1096,7 +1096,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.scrollToBottomClicked()
}, 100)
let sendMessage = this.chatServiceService.sendMessage(message, this.roomType)
this.messageResult(sendMessage)
//this.messageResult(sendMessage)
}
@@ -1154,7 +1154,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.scrollToBottomClicked()
}, 100)
let sendMessage = this.chatServiceService.sendMessage(message, this.roomType)
this.messageResult(sendMessage)
//this.messageResult(sendMessage)
this.textField = ''
}
@@ -1242,7 +1242,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.scrollToBottomClicked()
}, 100)
let sendMessage = this.chatServiceService.sendMessage(message, this.roomType)
this.messageResult(sendMessage)
//this.messageResult(sendMessage)
}
}
@@ -1266,7 +1266,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const fileExtension = await allowedDocExtension(file.value.type)
if(fileExtension.isOk()) {
//if(fileExtension.isOk()) {
console.log('FILE rigth?', file)
@@ -1297,12 +1297,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.scrollToBottomClicked()
}, 100)
let sendMessage = this.chatServiceService.sendMessage(message, this.roomType)
this.messageResult(sendMessage)
//this.messageResult(sendMessage)
}
} else {
this.toastService._badRequest("Ficheiro inválido")
}
//} else {
//this.toastService._badRequest("Ficheiro inválido")
//}
}
}