]> git.mxchange.org Git - friendica-addons.git/commitdiff
Twitter: Set the direction for imported posts
authorMichael <heluecht@pirati.ca>
Mon, 11 Jan 2021 06:14:22 +0000 (06:14 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 11 Jan 2021 06:14:22 +0000 (06:14 +0000)
twitter/twitter.php

index 68ca7faf7b42f97f517239f8a8226d219584b0c2..fc5022a9050ddd2e50800e714614ea5772b61292 100644 (file)
@@ -1584,6 +1584,7 @@ function twitter_createpost(App $a, $uid, $post, array $self, $create_user, $onl
        $postarray['uri'] = "twitter::" . $post->id_str;
        $postarray['protocol'] = Conversation::PARCEL_TWITTER;
        $postarray['source'] = json_encode($post);
+       $postarray['direction'] = Conversation::PULL;
 
        if (empty($uriid)) {
                $uriid = $postarray['uri-id'] = ItemURI::insert(['uri' => $postarray['uri']]);
@@ -1724,6 +1725,7 @@ function twitter_createpost(App $a, $uid, $post, array $self, $create_user, $onl
                        $postarray['thr-parent'] = $retweet['uri'];
                } else {
                        $retweet['source'] = $postarray['source'];
+                       $retweet['direction'] = $postarray['direction'];
                        $retweet['private'] = $postarray['private'];
                        $retweet['allow_cid'] = $postarray['allow_cid'];
                        $retweet['contact-id'] = $postarray['contact-id'];