Standards
This commit is contained in:
parent
19019381e6
commit
367479e50e
|
@ -24,8 +24,6 @@ namespace Friendica\Module\Api\Twitter\Statuses;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Content\Text\Markdown;
|
use Friendica\Content\Text\Markdown;
|
||||||
use Friendica\Core\Logger;
|
|
||||||
use Friendica\Core\System;
|
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
|
@ -43,7 +41,7 @@ use HTMLPurifier_Config;
|
||||||
* Updates the user’s current status.
|
* Updates the user’s current status.
|
||||||
*
|
*
|
||||||
* @see https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update
|
* @see https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update
|
||||||
*/
|
*/
|
||||||
class Update extends BaseApi
|
class Update extends BaseApi
|
||||||
{
|
{
|
||||||
public function post(array $request = [], array $post = [])
|
public function post(array $request = [], array $post = [])
|
||||||
|
@ -89,7 +87,8 @@ class Update extends BaseApi
|
||||||
$item['uid'] = $uid;
|
$item['uid'] = $uid;
|
||||||
$item['verb'] = Activity::POST;
|
$item['verb'] = Activity::POST;
|
||||||
$item['contact-id'] = $owner['id'];
|
$item['contact-id'] = $owner['id'];
|
||||||
$item['author-id'] = $item['owner-id'] = Contact::getPublicIdByUserId($uid);
|
$item['author-id'] = Contact::getPublicIdByUserId($uid);
|
||||||
|
$item['owner-id'] = $item['author-id'];
|
||||||
$item['title'] = $request['title'];
|
$item['title'] = $request['title'];
|
||||||
$item['body'] = $body;
|
$item['body'] = $body;
|
||||||
$item['app'] = $request['source'];
|
$item['app'] = $request['source'];
|
||||||
|
@ -117,6 +116,7 @@ class Update extends BaseApi
|
||||||
|
|
||||||
if ($request['in_reply_to_status_id']) {
|
if ($request['in_reply_to_status_id']) {
|
||||||
$parent = Post::selectFirst(['uri'], ['id' => $request['in_reply_to_status_id'], 'uid' => [0, $uid]]);
|
$parent = Post::selectFirst(['uri'], ['id' => $request['in_reply_to_status_id'], 'uid' => [0, $uid]]);
|
||||||
|
|
||||||
$item['thr-parent'] = $parent['uri'];
|
$item['thr-parent'] = $parent['uri'];
|
||||||
$item['gravity'] = GRAVITY_COMMENT;
|
$item['gravity'] = GRAVITY_COMMENT;
|
||||||
$item['object-type'] = Activity\ObjectType::COMMENT;
|
$item['object-type'] = Activity\ObjectType::COMMENT;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user