mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
added realtime to: - edit group name
- adicionar membro - remover membro
This commit is contained in:
@@ -16,6 +16,7 @@ export class RoomService {
|
||||
chatUser: ChatUserService[] = []
|
||||
customFields:any;
|
||||
id = ''
|
||||
t = ''
|
||||
name = ''
|
||||
_updatedAt = {}
|
||||
private hasLoadHistory = false
|
||||
@@ -30,10 +31,11 @@ export class RoomService {
|
||||
private MessageService: MessageService,
|
||||
) {}
|
||||
|
||||
setData({customFields, id, name, lastMessage, _updatedAt}) {
|
||||
setData({customFields, id, name, t, lastMessage, _updatedAt}) {
|
||||
this.customFields = customFields
|
||||
this.id = id
|
||||
this.name = name
|
||||
this.t = t
|
||||
this.lastMessage = lastMessage
|
||||
this._updatedAt = _updatedAt
|
||||
|
||||
@@ -52,13 +54,14 @@ export class RoomService {
|
||||
const message = new MessageService()
|
||||
message.setData(ChatMessage)
|
||||
this.lastMessage.msg = message.msg
|
||||
if(message.t == 'r'){this.name = message.msg}
|
||||
this.calDateDuration(ChatMessage._updatedAt)
|
||||
this.massages.push(message)
|
||||
|
||||
setTimeout(()=>{
|
||||
this.scrollDown()
|
||||
}, 100)
|
||||
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user