getSubscribedChannelGroupsForUUID method

Set<String> getSubscribedChannelGroupsForUUID(
  1. UUID uuid, {
  2. bool countPaused = true,
})
inherited

Returns a set of channel groups that uuid is currently subscribed to.

Implementation

Set<String> getSubscribedChannelGroupsForUUID(UUID uuid,
        {bool countPaused = true}) =>
    keysets.keysets
        .where((keyset) => keyset.uuid == uuid)
        .map((keyset) => _managers[keyset])
        .where((manager) => manager != null)
        .cast<Manager>()
        .expand((manager) => manager.subscriptions)
        .where(
            (sub) => !sub.isCancelled && (countPaused ? !sub.isPaused : true))
        .expand((sub) => sub.channelGroups)
        .toSet();