diff --git a/src/app/services/chat/room.service.ts b/src/app/services/chat/room.service.ts index 1969b7d7f..b30ae57ab 100644 --- a/src/app/services/chat/room.service.ts +++ b/src/app/services/chat/room.service.ts @@ -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() diff --git a/src/app/shared/chat/new-group/new-group.page.ts b/src/app/shared/chat/new-group/new-group.page.ts index 7a3625799..fce7f84fa 100644 --- a/src/app/shared/chat/new-group/new-group.page.ts +++ b/src/app/shared/chat/new-group/new-group.page.ts @@ -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: {