public static function is_user_in_conversation(int $userid, int $conversationid) : bool {
        global $DB;

        return $DB->record_exists('message_conversation_members', ['conversationid' => $conversationid,
            'userid' => $userid]);
    }
public static function is_user_in_conversation(int $userid, int $conversationid) : bool {
        global $DB;

        return $DB->record_exists('message_conversation_members', ['conversationid' => $conversationid,
            'userid' => $userid]);
    }
public static function is_user_in_conversation ( int $ userid , int $ conversationid ) : bool { global $ DB ; return $ DB -> record_exists ( 'message_conversation_members' , [ 'conversationid' => $ conversationid , 'userid' => $ userid ] ) ; }
Checks if a user is already in a conversation.

@param int $userid The id of the user we want to check if they are in a group
@param int $conversationid The id of the conversation
@return bool Returns true if a contact request exists, false otherwise
Checks if a user is already in a conversation .