Send endpoint chat status to other.

@param string $to status receiver
@param string $show status

@return ok
542441
public function status($to, $show){
		$data = array_merge($this->reqdata(), array(
			'nick' => $this->endpoint->nick,
			'to' => $to,
			'show' => $show,
		));
		return $this->request('statuses', $data, 'POST');
	}
493553
public function sendAcceptSubscriptionRequest($to)
    {
        $presence = new \sb\XMPP\Presence();
        $presence->setType('subscribed');
        $presence->setTo($to);
        return $this->sendPresence($presence);
    }
1309283
public function presence($status = null, $show = 'available', $to = null, $type = 'available', $priority = 0)
    {
        if ($type === 'available') {
            $type = '';
        }
        $to = htmlspecialchars($to);
        $status = htmlspecialchars($status);
        $show = htmlspecialchars($show);
        $type = htmlspecialchars($type);
        $priority = htmlspecialchars($priority);
        if ($show === 'unavailable') {
            $type = 'unavailable';
        }

        $out = "<presence";
        $out .= ' from="' . $this->fulljid . '"';
        if ($to) {
            $out .= ' to="' . $to . '"';
        }
        if ($type) {
            $out .= ' type="' . $type . '"';
        }
        $inner = '';
        if ($show !== 'available') {
            $inner .= "<show>$show</show>";
        }
        if ($status) {
            $inner .= "<status>$status</status>";
        }
        if ($priority) {
            $inner .= "<priority>$priority</priority>";
        }
        if ($inner === '') {
            $out .= "/>";
        } else {
            $out .= '>' . $inner . '</presence>';
        }

        $this->sendXML($out);
    }
179281
protected function sendRequest(
        $method,
        $endpoint,
        array $params = []
    ) {
        $request = $this->request($method, $endpoint, $params);

        return $this->lastResponse = $this->client->sendRequest($request);
    }
1289132
public function send($to, $message)
    {
        $this->app->make('log')->log($this->level, 'SMS Messange was sent to '.$to.' with contents: '.$message);
    }
115680
private function publishSymlink(string $origin, string $from, string $to)
    {
        $this->io->write(sprintf('Trying to install assets %s as symbolic links.', $origin));
        try {
            $this->filesystem->symlink($from, $to);
            $this->io->write(sprintf('Assets %s were installed using symbolic links.', $origin));
        } catch (IOException $e) {
            $this->io->write(sprintf(
                'It looks like your system doesn\'t support symbolic links,
                 so assets %s were installed by copying them.',
                $origin
            ));
            $this->filesystem->mirror($origin, $to);
        }
    }
973581
public function sendEvent(Event $event) {
        $this->send(
            self::ENDPOINT_EVENT . $this->getApiKey(),
            $event->toArray()
        );

        return $this;
    }
693314
public function afterPatch( $from, $to )
    {
        $schema = $this->getPatchData()
                       ->get( 'db', 'schema' );

        if ( is_array( $schema ) )
        {
            $schema = reset( $schema );
        }

        if ( $this->isZeroVersion( $from ) )
        {
            $developer = $this->selectFromTable( 'user', 'id', array(
                'groupId' => static::DEVELOPER_GROUP,
            ) );

            if ( ! $developer )
            {
                $developer = $this->insertDeveloper();
            }

            $platformOwner = $this->selectFromTable( 'user', 'id', array(
                'groupId' => static::SITE_OWNER_GROUP,
            ) );

            if ( ! $platformOwner )
            {
                $platformOwner = $this->insertPlatformOwner();
            }

            $content = $this->selectFromTable( 'paragraph', 'id', array(
                'type' => 'content',
            ) );

            if ( ! $content )
            {
                $content = $this->insertDefaultParagraph( 'content' );
            }

            $menu = $this->selectFromTable( 'menu', 'id' );

            if ( ! $menu )
            {
                $menu = $this->insertDefaultMenu( $content );
            }

            $layout = $this->selectFromTable( 'paragraph', 'id', array(
                'type' => 'layout',
            ) );

            if ( ! $layout )
            {
                $layout = $this->insertDefaultParagraph( 'layout' );
            }

            $subDomain = $this->selectFromTable( 'subdomain', 'id', array(
                'subdomain' => '',
            ) );

            if ( ! $subDomain )
            {
                $subDomain = $this->insertDefaultSubDomain( $layout, $content );
            }

            if ( ! empty( $schema ) )
            {
                foreach ( $this->uploadsDirs as $uploadsDir )
                {
                    @ mkdir(
                        implode( DIRECTORY_SEPARATOR, array(
                            '.',
                            'public',
                            'uploads',
                            $schema,
                            str_replace( '/', DIRECTORY_SEPARATOR, $uploadsDir )
                        ) ),
                        0777,
                        true
                    );
                }

                foreach ( $this->uploadsFiles as $uploadsFile => $copyFrom )
                {
                    @ copy(
                        str_replace( '/', DIRECTORY_SEPARATOR, $copyFrom ),
                        implode( DIRECTORY_SEPARATOR, array(
                            '.',
                            'public',
                            'uploads',
                            $schema,
                            str_replace( '/', DIRECTORY_SEPARATOR, $uploadsFile )
                        ) )
                    );
                }
            }
        }
        else
        {
            $schemas = array( $schema );

            if ( $this->getPatcher()
                      ->isMultisite() )
            {
                $schemas = $this->selectColumnFromTable(
                    array( '_central', 'site' ),
                    'schema'
                );
            }

            foreach ( $schemas as $schema )
            {
                $extraCssFile = 'public/uploads/' . $schema . '/customize/extra.css';

                if ( file_exists( $extraCssFile ) && is_readable( $extraCssFile ) )
                {
                    $extraCss = preg_replace(
                        '/^\s*@charset\s+(["\'][^"\']+["\']|[^;]+)\s*;\s+/',
                        '',
                        @ file_get_contents( $extraCssFile )
                    );

                    if ( ! empty( $extraCss ) )
                    {
                        $this->appendCustomizeGlobalExtra( $extraCss, $schema );
                        $this->getInstaller()
                             ->patchLog( 'customize extra %s merged', $extraCssFile );
                    }

                    @ unlink( $extraCssFile );
                }
            }
        }

        $this->mergePackagesConfig();
    }
1204079
public function accept($acceptable, $show = false)
    {
        $this->acceptable      = $acceptable;
        $this->show_acceptable = $show;

        return $this;
    }
58720
protected function executeAction($from = null, $to = null)
    {
        $context = $this->getRequest()->getParam('id', 'gems');
        $from    = $this->getRequest()->getParam('from', $from);
        $to      = $this->getRequest()->getParam('to', $to);

        $batch = $this->loader->getTaskRunnerBatch('upgrade' . $context);
        $batch->minimalStepDurationMs = 3000; // 3 seconds max before sending feedback

        if (!$batch->isLoaded()) {
            $this->_upgrades->setBatch($batch);
            $this->_upgrades->execute($context, $to, $from);
        }

        $title = sprintf($this->_('Upgrading %s'), $context);
        $this->_helper->BatchRunner($batch, $title, $this->accesslog);

        $this->html->br();
        $this->compatibilityReportAction();
    }
285121
public function sendVoiceCode($to, $code)
    {
        $params = [
            'called_num'        => $to,
            'called_show_num'   => $this->calledShowNum,
            'method'            => 'alibaba.aliqin.fc.voice.num.singlecall',
            'voice_code'        => $code,
        ];
        $this->request($params);
    }
1006684
public function notify($to, $message)
    {
        $params = [
            'From' => $this->config['from'],
            'To'   => $to,
            'Body' => $message,
        ];

        return $this->send($this->buildUrlFromString('Accounts/'.$this->config['client'].'/SMS/Messages.json'), $params);
    }
327437
public function sendMail($to, $subject, $view, $params = []): bool
    {
        if (empty($to)) {
            return false;
        }
        /** @var \yii\mail\MailerInterface $mailer */
        $mailer = $this->getMailer();
        return $mailer->compose(['html' => $view, 'text' => $view], $params)->setTo($to)->setSubject($subject)->send();
    }
400324
public function send(string $method, string $endpoint, array $parameters = null)
    {
        /** @var string|array $parameters */
        $data = $this->processor->prepare($method, $parameters);

        switch ($method) {
            case 'get':
                return $this->adapter->get(
                    $this->getEndpoint() . '/' . trim($endpoint, '/') . trim($data, '/')
                );
            case 'post':
                return $this->adapter->post(
                    $this->getEndpoint() . '/' . trim($endpoint, '/'),
                    $data ?? []
                );
        }
    }
320999
public function send($to, $text, $from = null, $time = null, $test = false, $partner_id = null) 
    {
        $url = self::HOST . self::SEND;
        $this->id = null;

        $params = $this->get_default_params();
        $params['to'] = $to;
        $params['text'] = $text;
        
        if ($from)
            $params['from'] = $from;

        if ($time && $time < (time() + 7 * 60 * 60 * 24))
            $params['time'] = $time;

        if ($test)
            $params['test'] = 1;

        if ($partner_id)
            $params['partner_id'] = $partner_id;

        $result = $this->request($url, $params);
        $result = explode("\n", $result);

        return array(
            'code' => $result[0],
            'id' => $result[1],
            'balance' => str_replace('balance=', '', $result[2])
        );
    }
572551
public function send($to)
    {
        // will throw exception
        $this->testValidateMessageParts();

        $message = $this->createMessage($to);

        return $this->mailManager->send($message);
    }
1181746
public function notify($to, $message)
    {
        $params = ['text' => $message];

        return $this->send($this->buildUrlFromString("rooms/{$to}/chatMessages"), $params);
    }