unsubscribeFromMailbox method

Future<void> unsubscribeFromMailbox(
  1. String ownerPeerId,
  2. String folderPath
)

Unsubscribe from mailbox topic

Implementation

Future<void> unsubscribeFromMailbox(String ownerPeerId, String folderPath) async {
  final topic = getMailboxTopic(ownerPeerId, folderPath);
  final subscription = _gossipSubSubscriptions.remove(topic);

  if (subscription != null) {
    await subscription.cancel();
    _logger.info('📡 Unsubscribed from: $topic');
  }
}