create direct message

This commit is contained in:
Peter Maquiran
2024-08-19 16:01:58 +01:00
parent 29d0a9b55e
commit ae50d9b3bd
46 changed files with 500 additions and 297 deletions
@@ -1,7 +1,7 @@
import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
import { AnimationController, GestureController, IonRange, ModalController, PopoverController } from '@ionic/angular';
import { ToastService } from 'src/app/services/toast.service';
import { ContactsPage } from '../new-group/contacts/contacts.page';
import { ContactsPage } from '../contacts/contacts.page';
import { ChatOptionsFeaturesPage } from 'src/app/modals/chat-options-features/chat-options-features.page';
import { TimeService } from 'src/app/services/functions/time.service';
import { FileService } from 'src/app/services/functions/file.service';
@@ -43,8 +43,9 @@ import { ChatPopoverPage } from '../../modal/chat-popover/chat-popover.page';
import { LastMessage } from '../../utils/lastMessage';
import { UserTypingLocalRepository } from 'src/app/module/chat/data/repository/user-typing-local-data-source.service';
import { UserTypingRemoteRepositoryService } from 'src/app/module/chat/data/repository/user-typing-live-data-source.service';
import { MessageLocalDataSourceService } from 'src/app/module/chat/data/repository/message-local-data-source.service';
import { MessageRemoteDataSourceService } from 'src/app/module/chat/data/repository/message-remote-data-source.service';
import { MessageLocalDataSourceService } from 'src/app/module/chat/data/repository/message/message-local-data-source.service';
import { MessageRemoteDataSourceService } from 'src/app/module/chat/data/repository/message/message-remote-data-source.service';
import { MessageEnum } from 'src/app/module/chat/domain/use-case/message-create-use-case.service';
@Component({
@@ -567,7 +568,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
safeFile: this.sanitiser.bypassSecurityTrustResourceUrl(this.audioRecordedDataUrl)
}]
this.chatServiceService.sendMessage(message)
this.chatServiceService.sendMessage(message, MessageEnum.group)
this.messages1[this.roomId].push(message)
setTimeout(() => {
this.scrollToBottomClicked()
@@ -628,7 +629,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
setTimeout(() => {
this.scrollToBottomClicked()
}, 100)
const data = await this.chatServiceService.sendMessage(message)
const data = await this.chatServiceService.sendMessage(message, MessageEnum.group)
}
@@ -810,7 +811,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
setTimeout(() => {
this.scrollToBottomClicked()
}, 100)
this.chatServiceService.sendMessage(message)
this.chatServiceService.sendMessage(message, MessageEnum.group)
}
@@ -866,7 +867,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
setTimeout(() => {
this.scrollToBottomClicked()
}, 100)
this.chatServiceService.sendMessage(message)
this.chatServiceService.sendMessage(message, MessageEnum.group)
this.textField = ''
}
@@ -920,7 +921,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
setTimeout(() => {
this.scrollToBottomClicked()
}, 100)
this.chatServiceService.sendMessage(message)
this.chatServiceService.sendMessage(message, MessageEnum.group)
}
}
@@ -976,7 +977,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
setTimeout(() => {
this.scrollToBottomClicked()
}, 100)
this.chatServiceService.sendMessage(message)
this.chatServiceService.sendMessage(message, MessageEnum.group)
}
} else {