mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
use new topic controller
This commit is contained in:
parent
781e46e2b8
commit
5504c7be84
@ -42,7 +42,7 @@ export default class APICore extends Core {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.client.ws.sockets.get(instance).joinTopic(topic)
|
return this.client.ws.sockets.get(instance).topics.subscribe(topic)
|
||||||
}
|
}
|
||||||
|
|
||||||
leaveTopic(instance = "main", topic) {
|
leaveTopic(instance = "main", topic) {
|
||||||
@ -51,7 +51,7 @@ export default class APICore extends Core {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.client.ws.sockets.get(instance).leaveTopic(topic)
|
return this.client.ws.sockets.get(instance).topics.unsubscribe(topic)
|
||||||
}
|
}
|
||||||
|
|
||||||
emitEvent(instance = "main", key, data) {
|
emitEvent(instance = "main", key, data) {
|
||||||
@ -86,8 +86,11 @@ export default class APICore extends Core {
|
|||||||
|
|
||||||
async onInitialize() {
|
async onInitialize() {
|
||||||
this.client = await createClient({
|
this.client = await createClient({
|
||||||
enableWs: true,
|
|
||||||
eventBus: app.eventBus,
|
eventBus: app.eventBus,
|
||||||
|
ws: {
|
||||||
|
enable: true,
|
||||||
|
autoConnect: true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// handle auth events
|
// handle auth events
|
||||||
|
Loading…
x
Reference in New Issue
Block a user