mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +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 this.client.ws.sockets.get(instance).joinTopic(topic)
|
||||
return this.client.ws.sockets.get(instance).topics.subscribe(topic)
|
||||
}
|
||||
|
||||
leaveTopic(instance = "main", topic) {
|
||||
@ -51,7 +51,7 @@ export default class APICore extends Core {
|
||||
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) {
|
||||
@ -86,8 +86,11 @@ export default class APICore extends Core {
|
||||
|
||||
async onInitialize() {
|
||||
this.client = await createClient({
|
||||
enableWs: true,
|
||||
eventBus: app.eventBus,
|
||||
ws: {
|
||||
enable: true,
|
||||
autoConnect: true,
|
||||
},
|
||||
})
|
||||
|
||||
// handle auth events
|
||||
|
Loading…
x
Reference in New Issue
Block a user