/** * sendPost * * @param string &$post Param * @param int $userid Param * * @return boolean */ protected function sendPost(&$post, $userid = null) { $this->logger->log(JLog::INFO, 'sendPost: postid = ' . $post->id); // Post for specific channel $channel = ChannelFactory::getInstance()->getChannel($post->channel_id); if (!$channel) { PostHelper::savePost(AutotweetPostHelper::POST_ERROR, 'COM_AUTOTWEET_ERR_CHANNEL_NOTFOUND', $post, $userid); return false; } $channel_id = $channel->getChannelId(); $response = $this->sharePost($channel, $post, $userid); // Store message in log return PostHelper::savePost($response['state'], $response['result_msg'], $post, $userid); }