mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 02:24:17 +00:00
added unsubscribeAll method
This commit is contained in:
parent
920b3e3c08
commit
307e9edee4
@ -44,6 +44,12 @@ class Client {
|
|||||||
this.emit("topic:unsubscribed", topic)
|
this.emit("topic:unsubscribed", topic)
|
||||||
return this.socket.unsubscribe(topic)
|
return this.socket.unsubscribe(topic)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsubscribeAll() {
|
||||||
|
for (const topic of this.socket.topics) {
|
||||||
|
this.unsubscribe(topic)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Client
|
export default Client
|
||||||
|
Loading…
x
Reference in New Issue
Block a user