visibleThread method

JsonMap visibleThread(
  1. String principalId,
  2. String threadId
)

The thread threadId when principalId sees it; else 404 not_found.

Implementation

JsonMap visibleThread(String principalId, String threadId) {
  if (!seesThread(principalId, threadId)) {
    throw const FakeProblem(404, 'not_found');
  }
  return threads[threadId]!;
}