Home > tupelo-wasm-sdk > CommunityMessenger > unsubscribe
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
unsubscribe is the reverse of subscribe and works the same as libp2p pubsub works, you pass in a topic and the original subscription and your callback will no longer receive messages from that topic
Signature:
unsubscribe(topic: string, subscriber: Function): Promise<unknown>;
Parameter | Type | Description |
---|---|---|
topic | string |
the community topic used to subscribe |
subscriber | Function |
the callback function your originally passed to subscribe |
Returns:
Promise<unknown>