fix last message

This commit is contained in:
Peter Maquiran
2024-09-01 14:27:32 +01:00
parent 41c63b6c56
commit d4776a5d7a
21 changed files with 132 additions and 115 deletions
@@ -8,7 +8,6 @@ import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.serv
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { ToastService } from 'src/app/services/toast.service';
import { SessionStore } from 'src/app/store/session.service';
import { MessageEnum } from 'src/app/module/chat/domain/use-case/message/message-create-use-case.service';
import { MessageEntity } from 'src/app/core/chat/entity/message';
// import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { RoomType } from "src/app/core/chat/entity/group";
@@ -170,9 +169,11 @@ export class ContactsPage implements OnInit {
const result = await this.chatServiceService.sendMessage(message, RoomType.Direct)
console.log('result', result);
if(result.isOk()) {
await this.chatServiceService.getRoomById(result.value.id)
this.close(result.value.roomId)
} else {
console.log(result.error)