mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
solved unauthorized rockect chat url
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<div>
|
||||
<div class="file">
|
||||
<!-- <canvas id="pdf_canvas"></canvas> -->
|
||||
<div (click)="viewDocument(file.title_link)" class="file-details add-ellipsis" *ngIf="msg.file">
|
||||
<div (click)="viewDocument(file.title_link, msg.file.type)" class="file-details add-ellipsis" *ngIf="msg.file">
|
||||
<span *ngIf="msg.file.type" class="cursor-pointer">
|
||||
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
||||
|
||||
@@ -14,6 +14,7 @@ import { ChatMessageStore } from 'src/app/store/chat/chat-message.service';
|
||||
import { ChatUserStorage } from 'src/app/store/chat/chat-user.service';
|
||||
import { TimeService } from 'src/app/services/functions/time.service';
|
||||
import { FileService } from 'src/app/services/functions/file.service';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
|
||||
@Component({
|
||||
selector: 'app-messages',
|
||||
@@ -68,6 +69,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
private timeService: TimeService,
|
||||
private fileService: FileService,
|
||||
private gestureController: GestureController,
|
||||
private http:HttpClient,
|
||||
) {
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
|
||||
@@ -239,11 +241,14 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
})
|
||||
}
|
||||
|
||||
viewDocument(url:string){
|
||||
this.fileService.viewDocumentByUrl(url);
|
||||
/* this.chatService.getDocumentDetails(url).subscribe(res => {
|
||||
console.log(res);
|
||||
}) */
|
||||
viewDocument(url:string, documentType?:string){
|
||||
if(documentType == "application/webtrix"){
|
||||
this.fileService.viewDocumentByUrl(url);
|
||||
}
|
||||
else{
|
||||
let fullUrl = "https://www.tabularium.pt" + url;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
}
|
||||
}
|
||||
|
||||
getChatMembers() {
|
||||
|
||||
Reference in New Issue
Block a user