improve chat

This commit is contained in:
Peter Maquiran
2022-01-12 11:52:05 +01:00
parent b8b4ba6a05
commit 5552aa484b
13 changed files with 46 additions and 44 deletions
+2 -3
View File
@@ -2,8 +2,6 @@ import { Injectable } from '@angular/core'
import { RocketChatClientService } from 'src/app/services/socket/rocket-chat-client.service';
import { MessageService } from 'src/app/services/chat/message.service'
import { ChatUserService } from 'src/app/services/chat/chat-user.service'
import { TimeService } from 'src/app/services/functions/time.service';
import { ChatService } from '../chat.service';
import { showDateDuration } from 'src/plugin/showDateDuration'
@Injectable({
providedIn: 'root'
@@ -47,6 +45,7 @@ export class RoomService {
message.setData(Chatmessage.result)
this.massages.push(message)
this.calDateDuration(Chatmessage.result._updatedAt)
}
)
}
@@ -58,7 +57,7 @@ export class RoomService {
// runs onces only
loadHistory(limit= 100) {
if(this.hasLoadHistory){ return false }
if(this.hasLoadHistory){ return false}
this.RocketChatClientService.loadHistory(this.id, limit).then((message:any) => {
console.log('loadHistory', message)