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' import { AESEncrypt } from '../services/aesencrypt.service'
const _AESEncrypt = new AESEncrypt() const _AESEncrypt = new AESEncrypt()
@@ -10,25 +10,25 @@ export class MessageModel extends models.Model {
mentions = ArrayField() mentions = ArrayField()
msg = models.CharField() msg = models.CharField()
rid = models.CharField() rid = models.CharField()
ts = models.CharField() ts = JsonField()
u = JsonField() u = JsonField()
_id = models.CharField({unique:true}) _id = models.CharField({unique:true})
_updatedAt = models.CharField() _updatedAt = models.IntegerField()
messageSend = models.BooleanField() messageSend = models.BooleanField()
offline = models.BooleanField() offline = models.BooleanField()
viewed = ArrayField() viewed = ArrayField()
received = ArrayField() received = ArrayField()
localReference = models.CharField({blank:true}) localReference = models.CharField({blank:true})
attachments = ArrayField() attachments = ArrayField({blank:true})
file = ArrayField() file = JsonField({blank:true})
} }
export class DeleteMessageModel extends models.Model { export class DeleteMessageModel extends models.Model {
messageId = models.IntegerField() messageId = models.CharField()
rid = models.CharField() rid = models.CharField()
ts = models.CharField() ts = JsonField()
u = JsonField() u = JsonField()
needToReceiveBy = ArrayField() needToReceiveBy = ArrayField()
+1 -6
View File
@@ -196,12 +196,7 @@ export class MessageService {
type: 'reConnect', type: 'reConnect',
funx: async ()=> { funx: async ()=> {
this.WsChatService.send(params).then(({message, requestId}) => { this.send()
let ChatMessage = message.result
this.messageSend = true
this.redefinedMessage(ChatMessage)
})
return true return true
} }
}) })
+1 -1
View File
@@ -728,7 +728,7 @@ export class WsChatService {
this.wsMsgQueue[requestId] = {message, requestId, loginRequired} this.wsMsgQueue[requestId] = {message, requestId, loginRequired}
} else { } else {
let messageStr = JSON.stringify(message) let messageStr = JSON.stringify(message)
console.log('messageStr', messageStr) // console.log('messageStr', messageStr)
this.socket.send(messageStr) this.socket.send(messageStr)
} }
+6 -20
View File
@@ -3,31 +3,17 @@
// The list of file replacements can be found in `angular.json`. // The list of file replacements can be found in `angular.json`.
export const environment = { export const environment = {
production: false, production: false,
apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
//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/',
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket',
//apiChatUrl: 'https://www.tabularium.pt/api/v1/',
/* apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', /* apiChatUrl: 'http://chat.gabinetedigital.local:3000/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 domain: 'gabinetedigital.local', //gabinetedigital.local
defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local
defaultuserpwd: 'tabteste@006', //tabteste@006, defaultuserpwd: 'tabteste@006', //tabteste@006,
chatOffline: true chatOffline: true
}; };
/* /*