solved unauthorized rockect chat url

This commit is contained in:
tiago.kayaya
2021-10-05 10:18:38 +01:00
parent 3f99ea222c
commit 5d4490e287
8 changed files with 34 additions and 30 deletions
+10 -5
View File
@@ -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() {