This commit is contained in:
Peter Maquiran
2022-07-26 17:18:52 +01:00
parent b23511c844
commit 86ada92883
2 changed files with 6 additions and 2 deletions
+3
View File
@@ -243,6 +243,7 @@ export class RoomService {
this.messagesLocalReference.push(ChatMessage.localReference);
alert('server add')
const message = await this.prepareCreate({message: ChatMessage, save: true});
message.messageSend = true
@@ -531,6 +532,7 @@ export class RoomService {
this.message= ''
this.messagesLocalReference.push(localReference)
alert('local add')
const message: MessageService = await this.prepareCreate({message:offlineChatMessage, save: environment.chatOffline})
await message.addMessageDB()
@@ -690,6 +692,7 @@ export class RoomService {
await chatHistory.result.messages.reverse().forEach(async(message: any) => {
if (!messagesId.includes(message._id)) {
alert('local history add')
const messagesToSave = await this.prepareMessageCreateIfNotExist_iD({message: message});
if(messagesToSave) {
messagesToSave.addMessageDB()
@@ -59,7 +59,6 @@ export class NewGroupPage implements OnInit{
}
});
}
@@ -112,7 +111,7 @@ export class NewGroupPage implements OnInit{
this.createGroupWithAttachmentsCath(res)
} else {
setTimeout(()=> {
this.createGroupWithAttachments(res)
}, 500)
@@ -139,6 +138,8 @@ export class NewGroupPage implements OnInit{
}
createGroupWithAttachments(res: any) {
this.wsChatMethodsService.getGroupRoom(res.result.rid).hasLoadHistory = true;
this.documents.forEach(element => {
this.wsChatMethodsService.getGroupRoom(res.result.rid).send({
file: {