mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Fix login
This commit is contained in:
@@ -100,9 +100,11 @@ export class HomePage implements OnInit {
|
||||
|
||||
this.RocketChatClientService.connect(()=>{
|
||||
this.RocketChatClientService.login({
|
||||
username: 'paulo.pinto@gabinetedigital.local',
|
||||
username: 'paulo.pinto',
|
||||
email: 'paulo.pinto@gabinetedigital.local',
|
||||
password: 'tabteste@006'
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
// this.RocketChatClientService.send()
|
||||
|
||||
@@ -34,6 +34,10 @@ class _RocketChatClientService {
|
||||
if(this.hasPing == false) {
|
||||
// first ping
|
||||
firstPingFunx()
|
||||
|
||||
setTimeout(()=>{
|
||||
this.getRooms()
|
||||
}, 5000)
|
||||
this.hasPing = true
|
||||
}
|
||||
}
|
||||
@@ -51,11 +55,8 @@ class _RocketChatClientService {
|
||||
id: requestId,
|
||||
params: [
|
||||
{
|
||||
"user": { "username": user.username },
|
||||
"password": {
|
||||
"digest": user.password,
|
||||
"algorithm":"sha-256"
|
||||
}
|
||||
user: { username: user.username },
|
||||
password: user.password
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -85,13 +86,21 @@ class _RocketChatClientService {
|
||||
return requestId;
|
||||
}
|
||||
|
||||
receive() {}
|
||||
subtribe() {}
|
||||
joinRoom(){}
|
||||
deleteMessage() {}
|
||||
createRoom() {}
|
||||
|
||||
getRooms() {
|
||||
const requestId = uuidv4()
|
||||
|
||||
const request = {
|
||||
"msg": "method",
|
||||
"method": "rooms/get",
|
||||
"id": requestId,
|
||||
"params": [ { "$date": 1480377601 } ]
|
||||
}
|
||||
this.ws.send(request, requestId)
|
||||
}
|
||||
|
||||
|
||||
@@ -116,10 +125,10 @@ class _RocketChatClientService {
|
||||
// socket class ==================================================================
|
||||
private socket!: WebSocket;
|
||||
private wsUrl = ''
|
||||
wsMsgQueue : msgQueue[] = []
|
||||
private wsMsgQueue : msgQueue[] = []
|
||||
private wsCallbacks: {[key: string]: wsCallbacksParams} = {}
|
||||
|
||||
ws = {
|
||||
private ws = {
|
||||
connected: false,
|
||||
registerCallback:(params: wsCallbacksParams) =>{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user