Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
17 | public function sendMessage($userId, $text) |
||
18 | { |
||
19 | $this->request->checkLoggedIn(); |
||
20 | $data = array( |
||
21 | "options" => array( |
||
22 | "user_ids" => array( |
||
23 | $userId, |
||
24 | ), |
||
25 | "emails" => array(), |
||
26 | "text" => $text, |
||
27 | ), |
||
28 | "context" => new \stdClass(), |
||
29 | ); |
||
30 | |||
31 | $request = ConversationHelper::createRequestData($data); |
||
32 | |||
33 | $postString = UrlHelper::buildRequestString($request); |
||
34 | $res = $this->request->exec(UrlHelper::RESOURCE_SEND_MESSAGE, $postString); |
||
35 | |||
36 | return ConversationHelper::checkMethodCallResult($res); |
||
37 | } |
||
38 | |||
56 |