This commit is contained in:
Peter Maquiran
2022-03-27 15:30:57 +01:00
parent 313314f3a5
commit 060299c71f
4 changed files with 15 additions and 34 deletions
+7 -7
View File
@@ -1,4 +1,4 @@
import { models } from 'beast-orm'
import { models } from '../../plugin/beast-orm/dist/src/'
import { AESEncrypt } from '../services/aesencrypt.service'
const _AESEncrypt = new AESEncrypt()
@@ -10,25 +10,25 @@ export class MessageModel extends models.Model {
mentions = ArrayField()
msg = models.CharField()
rid = models.CharField()
ts = models.CharField()
ts = JsonField()
u = JsonField()
_id = models.CharField({unique:true})
_updatedAt = models.CharField()
_updatedAt = models.IntegerField()
messageSend = models.BooleanField()
offline = models.BooleanField()
viewed = ArrayField()
received = ArrayField()
localReference = models.CharField({blank:true})
attachments = ArrayField()
file = ArrayField()
attachments = ArrayField({blank:true})
file = JsonField({blank:true})
}
export class DeleteMessageModel extends models.Model {
messageId = models.IntegerField()
messageId = models.CharField()
rid = models.CharField()
ts = models.CharField()
ts = JsonField()
u = JsonField()
needToReceiveBy = ArrayField()
+1 -6
View File
@@ -196,12 +196,7 @@ export class MessageService {
type: 'reConnect',
funx: async ()=> {
this.WsChatService.send(params).then(({message, requestId}) => {
let ChatMessage = message.result
this.messageSend = true
this.redefinedMessage(ChatMessage)
})
this.send()
return true
}
})
+1 -1
View File
@@ -728,7 +728,7 @@ export class WsChatService {
this.wsMsgQueue[requestId] = {message, requestId, loginRequired}
} else {
let messageStr = JSON.stringify(message)
console.log('messageStr', messageStr)
// console.log('messageStr', messageStr)
this.socket.send(messageStr)
}
+6 -20
View File
@@ -3,31 +3,17 @@
// 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/',
apiWsChatUrl: 'wss://www.tabularium.pt/websocket',
//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/',
/* 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
};
/*