(channel: LarkChannel)
| 218 | } |
| 219 | |
| 220 | private async disconnectChannel(channel: LarkChannel): Promise<void> { |
| 221 | if (this.channel === channel) this.channel = null; |
| 222 | this.clearSubscriptions(); |
| 223 | await closeLarkChannel(channel); |
| 224 | } |
| 225 | |
| 226 | private clearSubscriptions(): void { |
| 227 | for (const unsubscribe of this.unsubscribe.splice(0)) unsubscribe(); |
no test coverage detected