/**
  * @param InviteCreatedEvent $inviteCreatedEvent
  */
 public function onCreateInvite(InviteCreatedEvent $inviteCreatedEvent)
 {
     $invite = $inviteCreatedEvent->getInvite();
     if ($invite->getChannel() === InviteChannel::EMAIL) {
         $this->mailer->sendInviteEmail($invite);
     }
 }
 /**
  * @param MessageCreatedEvent $messageCreatedEvent
  */
 public function onMessageCreated(MessageCreatedEvent $messageCreatedEvent)
 {
     $message = $messageCreatedEvent->getMessage();
     $title = sprintf('[TASTD %s] %s ', $message->getCategory(), $message->getContent());
     $content = $message->getContent();
     $this->mailer->sendMessageToAdmin($title, $content);
 }