mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
improve
This commit is contained in:
@@ -320,13 +320,13 @@ export class ChatSystemService {
|
||||
this.defaultSubtribe(id)
|
||||
}
|
||||
|
||||
this.RochetChatConnectorService.streamNotifyLogged().then((subscription=>{
|
||||
this.RochetChatConnectorService.streamNotifyLogged().then((subscription => {
|
||||
console.log(subscription)
|
||||
}))
|
||||
|
||||
// this.RochetChatConnectorService.subStreamNotifyUser().then((subscription=>{
|
||||
// console.log(subscription)
|
||||
// }))
|
||||
this.RochetChatConnectorService.subStreamMessageUser().then((subscription => {
|
||||
console.log(subscription)
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -622,7 +622,7 @@ export class ChatSystemService {
|
||||
return !roomData.fname
|
||||
}
|
||||
|
||||
getUsers = () =>{
|
||||
getUsers = () => {
|
||||
return this.users
|
||||
}
|
||||
|
||||
|
||||
@@ -466,6 +466,34 @@ export class RochetChatConnectorService {
|
||||
|
||||
}
|
||||
|
||||
subStreamMessageUser(param?: any) {
|
||||
|
||||
const requestId = uuidv4()
|
||||
|
||||
let message = {
|
||||
msg: "sub",
|
||||
id: requestId,
|
||||
name: "stream-notify-user",
|
||||
params:[
|
||||
`${SessionStore.user.ChatData.data.userId}/message`,
|
||||
param
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
this.ws.send({message, requestId})
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
|
||||
if(message.id == requestId ) { // same request send
|
||||
resolve(message)
|
||||
return true
|
||||
}
|
||||
}})
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
receiveStreamNotifyRoom(funx: Function) {
|
||||
|
||||
this.ws.registerCallback({
|
||||
|
||||
Reference in New Issue
Block a user