mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -124,26 +124,13 @@ export class WsChatMethodsService {
|
||||
subscribeToRoom() {
|
||||
|
||||
for (const id in this.dm) {
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription)=>{
|
||||
console.log('streamRoomMessages', subscription)
|
||||
})
|
||||
|
||||
this.WsChatService.subStreamNotifyRoom(id, 'typing', false)
|
||||
this.WsChatService.streamNotifyRoomDeleteMessage(id).then((subscription)=>{
|
||||
console.log('streamNotifyRoomDeleteMessage', subscription);
|
||||
})
|
||||
this.defaultSubtribe(id)
|
||||
}
|
||||
|
||||
for (const id in this.group) {
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription)=>{
|
||||
console.log('streamRoomMessages', subscription)
|
||||
})
|
||||
|
||||
this.WsChatService.subStreamNotifyRoom(id, 'typing', false)
|
||||
this.WsChatService.streamNotifyRoomDeleteMessage(id).then((subscription)=>{
|
||||
console.log('streamNotifyRoomDeleteMessage', subscription);
|
||||
})
|
||||
this.defaultSubtribe(id)
|
||||
}
|
||||
|
||||
this.WsChatService.streamNotifyLogged().then((subscription=>{
|
||||
console.log('streamRoomMessages', subscription)
|
||||
}))
|
||||
@@ -151,20 +138,8 @@ export class WsChatMethodsService {
|
||||
|
||||
|
||||
subscribeToRoomUpdate(id, roomData) {
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription)=> {
|
||||
console.log('streamRoomMessages', subscription)
|
||||
})
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription) => {
|
||||
console.log('streamRoomMessages', subscription)
|
||||
})
|
||||
this.WsChatService.streamNotifyLogged().then((subscription=> {
|
||||
console.log('streamRoomMessages', subscription)
|
||||
}))
|
||||
this.WsChatService.streamNotifyRoomDeleteMessage(id).then((subscription)=>{
|
||||
console.log('streamNotifyRoomDeleteMessage', subscription);
|
||||
})
|
||||
|
||||
this.WsChatService.subStreamNotifyRoom(id, 'typing', false)
|
||||
|
||||
this.defaultSubtribe(id)
|
||||
|
||||
this.prepareRoom(roomData);
|
||||
|
||||
@@ -172,6 +147,22 @@ export class WsChatMethodsService {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated things a room need to subscribe on
|
||||
* @param id
|
||||
*/
|
||||
private defaultSubtribe(id) {
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription)=>{
|
||||
console.log('streamRoomMessages', subscription)
|
||||
})
|
||||
|
||||
this.WsChatService.subStreamNotifyRoom(id, 'typing', false)
|
||||
this.WsChatService.streamNotifyRoomDeleteMessage(id).then((subscription)=>{
|
||||
console.log('streamNotifyRoomDeleteMessage', subscription);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
prepareRoom(roomData) {
|
||||
let room:RoomService;
|
||||
@@ -214,6 +205,10 @@ export class WsChatMethodsService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description update user status
|
||||
* @param id user ID
|
||||
*/
|
||||
getUserStatus(id?:string) {
|
||||
|
||||
this.WsChatService.getUserStatus((d) => {
|
||||
|
||||
Reference in New Issue
Block a user