public static function get_self_conversation(int $userid) {
        global $DB;

        $conditions = [
            'type' => self::MESSAGE_CONVERSATION_TYPE_SELF,
            'convhash' => helper::get_conversation_hash([$userid])
        ];
        return $DB->get_record('message_conversations', $conditions);
    }
public static function get_self_conversation(int $userid) {
        global $DB;

        $conditions = [
            'type' => self::MESSAGE_CONVERSATION_TYPE_SELF,
            'convhash' => helper::get_conversation_hash([$userid])
        ];
        return $DB->get_record('message_conversations', $conditions);
    }
public static function get_self_conversation ( int $ userid ) { global $ DB ; $ conditions = [ 'type' => self :: MESSAGE_CONVERSATION_TYPE_SELF , 'convhash' => helper :: get_conversation_hash ( [ $ userid ] ) ] ; return $ DB -> get_record ( 'message_conversations' , $ conditions ) ; }
Returns the self conversation for a user.

@param int $userid The user id to get the self-conversations
@return \stdClass|false The self-conversation object or false if it doesn't exist
@since Moodle 3.7
Returns the self conversation for a user .