mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
added realtime to: - edit group name
- adicionar membro - remover membro
This commit is contained in:
@@ -112,30 +112,30 @@ export class AuthService {
|
||||
"password": user.password,
|
||||
}
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
console.log('login', SessionStore.user.RochetChatUser, SessionStore.user.Password)
|
||||
|
||||
this.WsChatService.connect();
|
||||
this.WsChatService.login().then((message) => {
|
||||
console.log('rocket chat login successfully', message)
|
||||
this.WsChatService.setStatus('online')
|
||||
}).catch((message)=>{
|
||||
console.log('rocket chat login failed', message)
|
||||
})
|
||||
}, 1)
|
||||
|
||||
let responseChat = await this.httpService.post('login', postData).toPromise();
|
||||
|
||||
if(responseChat) {
|
||||
|
||||
setTimeout(()=>{
|
||||
console.log('login', SessionStore.user.RochetChatUser, SessionStore.user.Password)
|
||||
|
||||
this.WsChatService.connect();
|
||||
this.WsChatService.login().then((message) => {
|
||||
console.log('rocket chat login successfully', message)
|
||||
this.WsChatService.setStatus('online')
|
||||
}).catch((message)=>{
|
||||
console.log('rocket chat login failed', message)
|
||||
})
|
||||
}, 1)
|
||||
|
||||
console.log('Login to Rocket chat OK');
|
||||
|
||||
this.ValidatedUserChat = responseChat;
|
||||
|
||||
localStorage.setItem('userChat', JSON.stringify(responseChat));
|
||||
localStorage.setItem('Meteor.loginToken', responseChat['data'].authToken);
|
||||
localStorage.setItem('Meteor.userId',responseChat['data'].userId);
|
||||
this.cookieService.set('rc_token', responseChat['data'].authToken);
|
||||
this.cookieService.set('rc_uid', responseChat['data'].userId);
|
||||
|
||||
this.storageService.store(AuthConnstants.AUTH, responseChat);
|
||||
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user