seesSpace method

bool seesSpace(
  1. String principalId,
  2. String spaceId
)

Whether principalId sees at least one channel of spaceId.

Implementation

bool seesSpace(String principalId, String spaceId) => channels.values.any(
  (c) => c.spaceId == spaceId && c.access.containsKey(principalId),
);