src/bbn/appui/chat.php
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;
  }
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;
  }
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 ; }
Checks whether the given user is participant of the given chat.

@param string $id_chat
@param string $id_user
@return bool|null
Checks whether the given user is participant of the given chat .