public function is_participant(string $id_chat, string $id_user = null): ?bool
  {
    if ( $this->check() ){
      return (bool)$this->db->count('bbn_chats_users', [
        'id_chat' => $id_chat,
        'id_user' => $id_user ?: $this->user->get_id()
      ]);
    }
    return null;
  }