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