unsubscribe

View as Markdown

unsubscribe

  • unsubscribe(channels): Promise<void>

List of channels from which you want to unsubscribe.

Parameters

NameTypeDescription
channelsstring | string[]The channels to unsubscribe from, either in the form of a string (for one channel) or an array of strings.

Returns

Promise<void>

Example

1await chatClient.unsubscribe("my-channel");
2await chatClient.unsubscribe(["chan-2", "chan-3"]);