mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
improve chat remove loop
This commit is contained in:
@@ -99,28 +99,6 @@ export class HomePage implements OnInit {
|
||||
console.log('loadHistory', message)
|
||||
})
|
||||
|
||||
|
||||
this.RocketChatClientService.getRooms().then((rooms: any)=>{
|
||||
console.log('rooms', rooms)
|
||||
|
||||
rooms.result.update.forEach((room:any) => {
|
||||
console.log('room', room)
|
||||
this.RocketChatClientService.subscribe(room.lastMessage.rid).then((subscription)=>{
|
||||
console.log('subscription', subscription)
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
this.RocketChatClientService.receiveLiveMessageFromRoom(
|
||||
'fsMwcNdufWvdnChj7ya9nF9cX2HizxxWAM',
|
||||
this.constructor.name,
|
||||
(Chatmessage)=>{
|
||||
console.log('chat', Chatmessage)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
window['jj'] = ()=>{
|
||||
//send message // roomId // Message
|
||||
this.RocketChatClientService.send('fsMwcNdufWvdnChj7ya9nF9cX2HizxxWAM', 'Mensagem enviada programaticamente.'+ new Date().toISOString())
|
||||
|
||||
Reference in New Issue
Block a user