From f2cf3163299e38a73db9a806f4a421e6b391f3a0 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Fri, 25 Mar 2022 14:32:15 +0100 Subject: [PATCH] save --- src/app/services/chat/message.service.ts | 2 +- src/app/services/chat/room.service.ts | 6 ++---- src/environments/environment.ts | 26 ++++++++++++++++++------ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/app/services/chat/message.service.ts b/src/app/services/chat/message.service.ts index 3c5e5e934..908bfd4cf 100644 --- a/src/app/services/chat/message.service.ts +++ b/src/app/services/chat/message.service.ts @@ -143,7 +143,7 @@ export class MessageService { this.uploadingFile = false - if(uploadSuccessfully || this.hasSendAttachment == false) { + if(uploadSuccessfully) { this.hasSendAttachment = true this.errorUploadingAttachment = false this.temporaryData = {} diff --git a/src/app/services/chat/room.service.ts b/src/app/services/chat/room.service.ts index 3d0ebedef..138093304 100644 --- a/src/app/services/chat/room.service.ts +++ b/src/app/services/chat/room.service.ts @@ -367,8 +367,6 @@ export class RoomService { if(this.messages[i]?._id == id ) { - - console.log(_id,'==',this.messages[i]?._id, true) this.messages.splice(i, 1) @@ -382,7 +380,7 @@ export class RoomService { if (SessionStore.user.RochetChatUser == this.messages[i].u.username) { const allMemberThatIsOffline = this.getAllMemberThatIsOffline() - await DeleteMessageModel.create({ + DeleteMessageModel.create({ messageId: this.messages[i]._id, rid: this.messages[i].rid, ts: this.messages[i].ts, @@ -391,7 +389,7 @@ export class RoomService { }) } - await this.messages[i].delateDB() + this.messages[i].delateDB() return true diff --git a/src/environments/environment.ts b/src/environments/environment.ts index cd809f519..b3c070ea0 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -3,17 +3,31 @@ // The list of file replacements can be found in `angular.json`. export const environment = { + production: false, - apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', - //apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', - apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', - apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket', - //apiChatUrl: 'https://www.tabularium.pt/api/v1/', - /* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */ + + //apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', + + apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', + + /* apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', + + apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket', */ + + apiChatUrl: 'https://www.tabularium.pt/api/v1/', + + apiWsChatUrl: 'wss://www.tabularium.pt/websocket', + + //apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', + domain: 'gabinetedigital.local', //gabinetedigital.local + defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local + defaultuserpwd: 'tabteste@006', //tabteste@006, + chatOffline: true + }; /*