mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve chat
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user