mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
save
This commit is contained in:
@@ -40,45 +40,6 @@ export class ChatService {
|
||||
headers: this.headers,
|
||||
};
|
||||
|
||||
/* console.log("CHAT SERVICE");
|
||||
|
||||
wsService.messages = <Subject<any>>this.wsService
|
||||
.connect(environment.apiWsChatUrl)
|
||||
.map((response: MessageEvent): any => {
|
||||
let data = JSON.parse(response.data);
|
||||
console.log(data);
|
||||
|
||||
if(data.msg == 'ping'){
|
||||
wsService.messages.next({msg:'pong'});
|
||||
if(!this.authService.isWsAuthenticated){
|
||||
//this.authService.loginWsChat();
|
||||
|
||||
let msg = {
|
||||
"msg": "method",
|
||||
"method": "login",
|
||||
"id":"1",
|
||||
"params":[
|
||||
{
|
||||
"user": { "username": "paulo.pinto" },
|
||||
"password": "tabteste@006"
|
||||
}
|
||||
]
|
||||
}
|
||||
wsService.messages.next(msg);
|
||||
console.log('Authenticate');
|
||||
this.authService.isWsAuthenticated = true;
|
||||
|
||||
}
|
||||
//this.authService.loginWsChat();
|
||||
}
|
||||
if(data.id == '1'){
|
||||
this.authService.wsValidatedUserChat = data;
|
||||
}
|
||||
return (JSON.stringify(data));
|
||||
});
|
||||
|
||||
console.log(wsService.messages) */;
|
||||
|
||||
}
|
||||
|
||||
getDocumentDetails(url:string){
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="room.customFields.countDownDate" class="d-flex align-items-center yellow-orange pl-10">
|
||||
<!-- <div *ngIf="room.customFields.countDownDate" class="d-flex align-items-center yellow-orange pl-10">
|
||||
<i class="far fa-clock font-15" ></i>
|
||||
<ion-label class="font-15 pl-10" color="warning">{{countDownDate()}}</ion-label>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
@@ -22,6 +22,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { PreviewCameraPage } from 'src/app/modals/preview-camera/preview-camera.page';
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
|
||||
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service';
|
||||
|
||||
/*
|
||||
import * as pdfjsLib from 'pdfjs-dist';
|
||||
@@ -90,7 +91,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
private processesService: ProcessesService,
|
||||
private fileService: FileService,
|
||||
public ThemeService: ThemeService,
|
||||
private changeDetectorRef: ChangeDetectorRef
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
public wsChatMethodsService: WsChatMethodsService
|
||||
) {
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.isGroupCreated = true;
|
||||
@@ -101,9 +103,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
this.getRoomInfo();
|
||||
//this.scrollToBottom();
|
||||
//this.wsChatMethodsService.getRoom(this.roomId).loadHistory();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
alert('Here')
|
||||
//console.log(this.wsChatMethodsService.getRoom(this.roomId).massages);
|
||||
|
||||
this.loggedUser=this.loggedUserChat;
|
||||
this.getRoomInfo();
|
||||
this.serverLongPull();
|
||||
|
||||
Reference in New Issue
Block a user