mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
add subscribe
This commit is contained in:
@@ -107,8 +107,16 @@ export class HomePage implements OnInit {
|
||||
}).then((message)=>{
|
||||
// alert('login')
|
||||
console.log('rocket chat login successfully', message)
|
||||
this.RocketChatClientService.getRooms().then((rooms)=>{
|
||||
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)
|
||||
})
|
||||
});
|
||||
|
||||
})
|
||||
}).catch((message)=>{
|
||||
console.log('rocket chat login failed', message)
|
||||
|
||||
Reference in New Issue
Block a user