mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add method send message
This commit is contained in:
@@ -38,6 +38,8 @@ import { ChangeDetectorRef } from '@angular/core';
|
||||
import { RoomRepositoryService } from 'src/app/services/Repositorys/chat/repository/room-repository.service';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RoomListItemOutPutDTO, RoomListOutPutDTO } from 'src/app/services/Repositorys/chat/dto/room/roomListOutputDTO';
|
||||
import { MessageRepositoryService } from 'src/app/services/Repositorys/chat/repository/message-respository.service';
|
||||
import { MessageInputDTO } from 'src/app/services/Repositorys/chat/dto/message/messageInputDtO';
|
||||
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
@@ -130,7 +132,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
private fileOpener: FileOpener,
|
||||
public p: PermissionService,
|
||||
private FileValidatorService: FileValidatorService,
|
||||
private roomRepositoryService: RoomRepositoryService
|
||||
private roomRepositoryService: RoomRepositoryService,
|
||||
private messageRepositoryService: MessageRepositoryService
|
||||
) {
|
||||
// update
|
||||
this.checkAudioPermission()
|
||||
@@ -400,7 +403,17 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
sendMessage() {
|
||||
|
||||
const data: MessageInputDTO = {
|
||||
roomId: this.roomId,
|
||||
senderId: SessionStore.user.UserId,
|
||||
message: "hello",
|
||||
messageType: 0,
|
||||
canEdit: false,
|
||||
oneShot:false,
|
||||
requireUnlock: false,
|
||||
}
|
||||
|
||||
this.messageRepositoryService.sendMessage(data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user