This commit is contained in:
Eudes Inácio
2022-02-09 15:11:51 +01:00
@@ -97,7 +97,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
private AttachmentsService: AttachmentsService,
private storage: Storage,
private processesService: ProcessesService,
private CameraService: CameraService,
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
@@ -112,7 +112,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory();
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked;
this.wsChatMethodsService.openRoom(this.roomId)
setTimeout(()=>{
this.scrollToBottomClicked()
}, 50)
@@ -199,7 +199,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
changeInput() {
this.wsChatMethodsService.getDmRoom(this.roomId).typing()
this.wsChatMethodsService.getGroupRoom(this.roomId).typing()
}
async goToEvent(eventId: any) {
@@ -437,11 +437,11 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
}
async takePicture() {
const roomId = this.roomId
const image = await this.CameraService.takePicture();
await this.fileService.saveImage(image)
const lastphoto: any = await this.fileService.loadFiles();
@@ -451,7 +451,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.wsChatMethodsService.getGroupRoom(roomId).send({
file: {
"type": "application/img",
"guid": ''
@@ -466,11 +466,11 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
})
}
async addImage() {
this.addFileToChat(['image/apng', 'image/jpeg', 'image/png'])
}
async addFile() {
this.addFileToChat(['.doc', '.docx', '.pdf'])
}
@@ -492,7 +492,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
if(data.selected) {
const loader = this.toastService.loading();
this.wsChatMethodsService.getDmRoom(this.roomId).send({
this.wsChatMethodsService.getGroupRoom(this.roomId).send({
file:{
"name": res.data.selected.Assunto,
"type": "application/webtrix",
@@ -528,8 +528,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
const formData = new FormData();
formData.append("blobFile", file);
this.wsChatMethodsService.getDmRoom(this.roomId).send({
this.wsChatMethodsService.getGroupRoom(this.roomId).send({
file: {
"type": "application/img",
"guid": ''
@@ -544,7 +544,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
})
}
async openChatOptions(ev?: any) {
console.log(this.members);
const roomId = this.roomId;