private function _updateToweibo($data, $sourceInfo, $lessUids)
{
$commentInfo = model('Source')->getSourceInfo($data['table'], $data['row_id'], false, $data['app']);
$oldInfo = isset($commentInfo['sourceInfo']) ? $commentInfo['sourceInfo'] : $commentInfo;
// 根据评论的对象获取原来的内容
$arr = array('post', 'postimage', 'postfile', 'weiba_post', 'postvideo');
$scream = '';
if (!in_array($sourceInfo['type'], $arr)) {
$scream = '//@' . $commentInfo['source_user_info']['uname'] . ':' . $commentInfo['source_content'];
}
if (!empty($data['to_comment_id'])) {
$replyInfo = model('Comment')->init($data['app'], $data['table'])->getCommentInfo($data['to_comment_id'], false);
$replyScream = '//@' . $replyInfo['user_info']['uname'] . ' :';
$data['content'] .= $replyScream . $replyInfo['content'];
}
$s['body'] = $data['content'] . $scream;
$s['sid'] = $oldInfo['source_id'];
$s['app_name'] = $oldInfo['app'];
$s['type'] = $oldInfo['source_table'];
$s['comment'] = $data['comment_old'];
$s['comment_touid'] = $data['app_uid'];
// 如果为原创分享,不给原创用户发送@信息
if ($sourceInfo['type'] == 'post' && empty($data['to_uid'])) {
$lessUids[] = $this->mid;
}
model('Share')->shareFeed($s, 'comment', $lessUids);
model('Credit')->setUserCredit($this->mid, 'forwarded_weibo');
}