查询群发消息发送状态【订阅号与服务号认证后均可用】
@param $messageId
@return bool|mixed
@throws \yii\web\HttpException
513278
public function getSendAllStatus($messageId)
    {
        $result = $this->httpRaw(self::WECHAT_SEND_ALL_STATUS, [
            'msgid' => $messageId
        ], [
            'access_token' => $this->getAccessToken()
        ]);
        return isset($result['msg_status']) ? $result : false;
    }
866461
public function findByNewsletterId($NewsletterId) {
        $response = $this->mailjet->get(Resources::$Campaign, ['mj.nl' => $NewsletterId]);
        if (!$response->success()) {
            $this->throwError("CampaignService:findByNewsletterId() failed", $response);
        }

        return $response->getData();
    }
389131
public function getProduct($productId)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_PRODUCT_GET_PREFIX, [
            'product_id' => $productId
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success' ? $result['product_info'] : false;
    }
343875
public function getSms($messageId)
    {
        $sms = $this->factory->createEmptySms();
        $sms->populate($messageId);

        return $sms;
    }
640347
public function verifyToken($messageId, $token)
    {
        try {
            $verification = $this->getTokenResult($messageId, $token);

            return ($verification->getStatusCode() === Verification::STATUS_SUCCESS);
        } catch (Exception $e) {
            return false;
        }
    }
935343
public function delete($notificationId)
    {
        return $this->sendRequest(
            self::METHOD_DELETE,
            str_replace(':notification_id', $notificationId, self::$endPoints['delete'])
        );
    }
417388
public function mark_pm_unread($messageId)
    {
        try {
            $manager = $this->container->get('symbb.extension.tapatalk.manager.user');
            return $manager->markPmUnread($messageId);
        } catch (\Exception $exc) {
            return $this->errorResponse($exc);
        }
    }
281266
public function getMessage($messageId)
    {
        $this->buildCall('/incoming-messages');
        $this->buildCall('/'.$messageId);

        $rawMessage = $this->getRequest()->json();

        return $this->makeMessage($rawMessage['Response']['Entry']);
    }
1030670
public function getMessage($boxId, $messageId, $entityId = null, $originalSignature = null)
    {
        $response = $this->doRequest(
            self::RESOURCE_GET_MESSAGE,
            [
                'boxId' =>  $boxId,
                'messageId' =>  $messageId,
                'entityId'  =>  $entityId,
                'originalSignature' => $originalSignature
            ]
        );

        return Message::fromStream($response);
    }
272262
public function getVerification($messageId)
    {
        $verification = $this->factory->createEmptyVerification();
        $verification->populate($messageId);

        return $verification;
    }
473987
private function message_has_flag($messageid, $flag) {
        // Get the current mailbox.
        $mailbox = $this->get_mailbox();

        // Grab messagedata including flags.
        $query = new \Horde_Imap_Client_Fetch_Query();
        $query->flags();
        $query->structure();
        $messagedata = $this->client->fetch($mailbox, $query, array(
            'ids' => $messageid,
        ))->first();
        $flags = $messagedata->getFlags();

        return in_array($flag, $flags);
    }
577023
public function getTokenResult($messageId, $token)
    {
        $verification = $this->factory->createEmptyVerification();
        $verification->verify($token, $messageId);

        return $verification;
    }
270173
public function markPmUnread($messageId)
    {
        $this->debug('markPmUnread');
        $message = $this->messageManager->find($messageId);

        foreach ($message->getReceivers() as $reciver) {
            if ($reciver->getUser()->getId() == $this->userManager->getCurrentUser()->getId()) {
                $this->messageManager->unread($reciver);
            }
        }

        $result['result'] = new \Zend\XmlRpc\Value\Boolean(true);
        $response = $this->getResponse($result, 'struct');

        return $response;
    }
726200
public function makeSeen($messageId)
    {
        $seen = $this->message->update($messageId, ['is_seen' => 1]);
        if ($seen) {
            return true;
        }

        return false;
    }
685210
public function markAsDispatched($messageId)
    {
        if (!isset($this->messages[$messageId])) {
            return;
        }

        $this->messages[$messageId]->markAsDispatched();
    }
62220
public function get($mediaId)
    {
        $node     = 'get';
        $queryStr = ['media_id' => $mediaId];

        $res = $this->_get($node, $queryStr);

        return $res;
    }
1328147
public function get($id) {
        $id=($id==='')?"0":$id;
        if (!isset($this->items[$id])) {
            return new MessageItem(); // we returns an empty error.
        }
        return $this->items[$id];
    }