mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix ballon
This commit is contained in:
@@ -351,7 +351,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
async loadAttachment() {
|
||||
for(const message of this.messages1[this.roomId]) {
|
||||
if(message.hasAttachment) {
|
||||
if(message.hasAttachment && message.attachments[0].source != MessageAttachmentSource.Webtrix) {
|
||||
|
||||
if(message.$id) {
|
||||
this.chatServiceService.getMessageAttachmentByMessageId(message).then((result)=> {
|
||||
@@ -422,6 +422,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
this.messageReceiveSubject?.unsubscribe();
|
||||
this.messageReceiveSubject = this.chatServiceService.listenToIncomingMessage(this.roomId).subscribe(async (message) => {
|
||||
|
||||
const date = whatsappDate(message.sentAt, false)
|
||||
if(!this.date[date]) {
|
||||
this.date[date] = true
|
||||
const Ballon = XBallon(message)
|
||||
this.messages1[this.roomId].push(Ballon)
|
||||
}
|
||||
|
||||
this.messages1[this.roomId].push(new MessageViewModal(message))
|
||||
|
||||
if(message.hasAttachment) {
|
||||
@@ -754,8 +761,19 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
safeFile: this.sanitiser.bypassSecurityTrustResourceUrl(this.audioRecordedDataUrl)
|
||||
}]
|
||||
|
||||
this.chatServiceService.sendMessage(message, this.roomType)
|
||||
message.sentAt = new Date().toISOString()
|
||||
|
||||
|
||||
const date = whatsappDate(message.sentAt, false)
|
||||
if(!this.date[date]) {
|
||||
this.date[date] = true
|
||||
const Ballon = XBallon(message)
|
||||
this.messages1[this.roomId].push(Ballon)
|
||||
}
|
||||
|
||||
this.messages1[this.roomId].push(message)
|
||||
this.chatServiceService.sendMessage(message, this.roomType)
|
||||
|
||||
setTimeout(() => {
|
||||
this.scrollToBottomClicked()
|
||||
}, 100)
|
||||
@@ -811,6 +829,14 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
message.sentAt = new Date().toISOString()
|
||||
|
||||
this.textField = ''
|
||||
|
||||
const date = whatsappDate(message.sentAt, false)
|
||||
if(!this.date[date]) {
|
||||
this.date[date] = true
|
||||
const Ballon = XBallon(message)
|
||||
this.messages1[this.roomId].push(Ballon)
|
||||
}
|
||||
|
||||
this.messages1[this.roomId].push(message)
|
||||
setTimeout(() => {
|
||||
this.scrollToBottomClicked()
|
||||
@@ -997,7 +1023,14 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
mimeType: 'image/'+picture.value.format
|
||||
}]
|
||||
|
||||
this.messages1[this.roomId].push(new MessageViewModal(message))
|
||||
|
||||
const date = whatsappDate(message.sentAt, false)
|
||||
if(!this.date[date]) {
|
||||
this.date[date] = true
|
||||
const Ballon = XBallon(message)
|
||||
this.messages1[this.roomId].push(Ballon)
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this.scrollToBottomClicked()
|
||||
}, 100)
|
||||
@@ -1053,6 +1086,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
docId: res.data.selected.Id,
|
||||
}]
|
||||
|
||||
const date = whatsappDate(message.sentAt, false)
|
||||
if(!this.date[date]) {
|
||||
this.date[date] = true
|
||||
const Ballon = XBallon(message)
|
||||
this.messages1[this.roomId].push(Ballon)
|
||||
}
|
||||
|
||||
this.messages1[this.roomId].push(new MessageViewModal(message))
|
||||
setTimeout(() => {
|
||||
this.scrollToBottomClicked()
|
||||
@@ -1143,6 +1183,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
description: ''
|
||||
}]
|
||||
|
||||
const date = whatsappDate(message.sentAt, false)
|
||||
if(!this.date[date]) {
|
||||
this.date[date] = true
|
||||
const Ballon = XBallon(message)
|
||||
this.messages1[this.roomId].push(Ballon)
|
||||
}
|
||||
|
||||
this.messages1[this.roomId].push(message)
|
||||
setTimeout(() => {
|
||||
this.scrollToBottomClicked()
|
||||
@@ -1199,6 +1246,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
mimeType: file.value.type
|
||||
}]
|
||||
|
||||
const date = whatsappDate(message.sentAt, false)
|
||||
if(!this.date[date]) {
|
||||
this.date[date] = true
|
||||
const Ballon = XBallon(message)
|
||||
this.messages1[this.roomId].push(Ballon)
|
||||
}
|
||||
|
||||
this.messages1[this.roomId].push(message)
|
||||
setTimeout(() => {
|
||||
this.scrollToBottomClicked()
|
||||
|
||||
Reference in New Issue
Block a user