Пример #1
0
 /**
  * Make sure that a player can participate in a conversation
  *
  * Throws an exception if a player is not an admin or a member of that conversation
  * @todo Permission for spying on other people's conversations?
  * @param  Player        $player  The player to test
  * @param  Conversation         $conversation   The message conversation
  * @param  string        $message The error message to show
  * @throws HTTPException
  * @return void
  */
 private function assertCanParticipate(Player $player, Conversation $conversation, $message = "You are not allowed to participate in that discussion")
 {
     if (!$conversation->isMember($player)) {
         throw new ForbiddenException($message);
     }
 }