mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix rocket chat session
This commit is contained in:
@@ -11,6 +11,7 @@ import { SessionStore } from '../store/session.service';
|
||||
import { AESEncrypt } from '../services/aesencrypt.service';
|
||||
import { CookieService } from 'ngx-cookie-service';
|
||||
import { WsChatService } from 'src/app/services/chat/ws-chat.service';
|
||||
import { ChatService } from './chat.service';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -31,7 +32,8 @@ export class AuthService {
|
||||
public alertController: AlertController,
|
||||
private aesencrypt: AESEncrypt,
|
||||
private cookieService: CookieService,
|
||||
private WsChatService: WsChatService) {
|
||||
private WsChatService: WsChatService,
|
||||
private ChatService: ChatService) {
|
||||
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
@@ -116,8 +118,9 @@ export class AuthService {
|
||||
|
||||
if(responseChat) {
|
||||
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
console.log('login', SessionStore.user.RochetChatUser, SessionStore.user.Password)
|
||||
|
||||
this.WsChatService.connect();
|
||||
this.WsChatService.login().then((message) => {
|
||||
@@ -133,8 +136,8 @@ export class AuthService {
|
||||
this.ValidatedUserChat = responseChat;
|
||||
|
||||
localStorage.setItem('userChat', JSON.stringify(responseChat));
|
||||
|
||||
this.storageService.store(AuthConnstants.AUTH, responseChat);
|
||||
this.ChatService.setHeader()
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user