From: Michael Date: Sat, 29 Oct 2022 22:14:12 +0000 (+0000) Subject: Add native quotes to the upon posting X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2de97487f32f65452f7b778d99412b4955a914bf;p=friendica-addons.git Add native quotes to the upon posting --- diff --git a/diaspora/diaspora.php b/diaspora/diaspora.php index 8b304181..1fe6fa12 100644 --- a/diaspora/diaspora.php +++ b/diaspora/diaspora.php @@ -202,7 +202,7 @@ function diaspora_send(App $a, array &$b) return; } - $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); // Dont't post if the post doesn't belong to us. // This is a check for forum postings diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index a8e82854..5a7e6ba4 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -134,7 +134,7 @@ function dwpost_send(App $a, array &$b) return; } - $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); /* * dreamwidth post in the LJ user's timezone. diff --git a/libertree/libertree.php b/libertree/libertree.php index 999c4972..c4d8ce45 100644 --- a/libertree/libertree.php +++ b/libertree/libertree.php @@ -157,7 +157,7 @@ function libertree_send(App $a, array &$b) return; } - $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); $ltree_api_token = DI::pConfig()->get($b['uid'],'libertree','libertree_api_token'); $ltree_url = DI::pConfig()->get($b['uid'],'libertree','libertree_url'); diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 42b0c020..9f5cd65c 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -130,7 +130,7 @@ function ljpost_send(App $a, array &$b) return; } - $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); // LiveJournal post in the LJ user's timezone. // Hopefully the person's Friendica account diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index cb890277..4a7d96d2 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -396,7 +396,7 @@ function pumpio_send(App $a, array &$b) Logger::debug('pumpio_send: parameter ', $b); - $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); if ($b['parent'] != $b['id']) { // Looking if its a reply to a pumpio post diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 7ed90f9e..97281a39 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -440,7 +440,7 @@ function statusnet_post_hook(App $a, array &$b) return; } - $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); $api = DI::pConfig()->get($b['uid'], 'statusnet', 'baseapi'); $hostname = preg_replace("=https?://([\w\.]*)/.*=ism", "$1", $api); diff --git a/tumblr/tumblr.php b/tumblr/tumblr.php index 261f037e..281c58ac 100644 --- a/tumblr/tumblr.php +++ b/tumblr/tumblr.php @@ -331,7 +331,7 @@ function tumblr_send(App $a, array &$b) { return; } - $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); $oauth_token = DI::pConfig()->get($b['uid'], "tumblr", "oauth_token"); $oauth_token_secret = DI::pConfig()->get($b['uid'], "tumblr", "oauth_token_secret"); diff --git a/twitter/twitter.php b/twitter/twitter.php index 1c71a076..6a3d0eb1 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -643,7 +643,7 @@ function twitter_post_hook(App $a, array &$b) return; } - $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); $thr_parent = null; diff --git a/wppost/wppost.php b/wppost/wppost.php index 9c12bb6e..aa7adf5e 100644 --- a/wppost/wppost.php +++ b/wppost/wppost.php @@ -172,7 +172,7 @@ function wppost_send(App $a, array &$b) return; } - $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); $wp_username = XML::escape(DI::pConfig()->get($b['uid'], 'wppost', 'wp_username')); $wp_password = XML::escape(DI::pConfig()->get($b['uid'], 'wppost', 'wp_password'));