This commit is contained in:
Peter Maquiran
2022-04-06 14:55:14 +01:00
44 changed files with 430 additions and 292 deletions
+6 -4
View File
@@ -19,6 +19,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
import { RoomService } from './chat/room.service';
import { Storage } from '@ionic/storage';
import { InitialsService } from './functions/initials.service';
import { PermissionService } from './permission.service';
@Injectable({
providedIn: 'root'
@@ -46,16 +47,17 @@ export class AuthService {
private processesService: ProcessesService,
private AttachmentsService: AttachmentsService,
private storage: Storage,
private initialsService: InitialsService ) {
private initialsService: InitialsService,
public p: PermissionService, ) {
this.headers = new HttpHeaders();
if (SessionStore.exist) {
this.ValidatedUser = SessionStore.user
// console.log('login', SessionStore.user.RochetChatUser, SessionStore.user.Password)
this.loginToChatWs()
if(this.p.userPermission(this.p.permissionList.Chat.access) == true ){
this.loginToChatWs()
}
}
if (localStorage.getItem("userChat") != null) {