From: Hypolite Petovan Date: Thu, 14 May 2020 02:40:02 +0000 (-0400) Subject: [twitter] Remove references to obsolete virtual field item.tag X-Git-Tag: 2020.07~22^2 X-Git-Url: https://reisub.nsupdate.info/git/?a=commitdiff_plain;h=5e397ad580012e523c2cecf69dc9b8a5f7fa0d56;hp=cf6bf67fd8dc1e756fa3bfc30d4e1e7cb0cbde51;p=friendica-addons.git%2F.git [twitter] Remove references to obsolete virtual field item.tag --- diff --git a/twitter/twitter.php b/twitter/twitter.php index 3742f0d8..afe7f101 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1224,14 +1224,12 @@ function twitter_expand_entities($body, stdClass $status, $picture) { $plain = $body; - $tags = []; $taglist = []; $replacementList = []; foreach ($status->entities->hashtags AS $hashtag) { $replace = '#[url=' . DI::baseUrl()->get() . '/search?tag=' . $hashtag->text . ']' . $hashtag->text . '[/url]'; - $tags['#' . $hashtag->text] = $replace; $taglist['#' . $hashtag->text] = ['#', $hashtag->text, '']; $replacementList[$hashtag->indices[0]] = [ @@ -1242,7 +1240,6 @@ function twitter_expand_entities($body, stdClass $status, $picture) foreach ($status->entities->user_mentions AS $mention) { $replace = '@[url=https://twitter.com/' . rawurlencode($mention->screen_name) . ']' . $mention->screen_name . '[/url]'; - $tags['@' . $mention->screen_name] = $replace; $taglist['@' . $mention->screen_name] = ['@', $mention->screen_name, 'https://twitter.com/' . rawurlencode($mention->screen_name)]; $replacementList[$mention->indices[0]] = [ @@ -1344,7 +1341,7 @@ function twitter_expand_entities($body, stdClass $status, $picture) } } - return ['body' => $body, 'tags' => $tags, 'plain' => $plain, 'taglist' => $taglist]; + return ['body' => $body, 'plain' => $plain, 'taglist' => $taglist]; } /** @@ -1557,7 +1554,6 @@ function twitter_createpost(App $a, $uid, $post, array $self, $create_user, $onl $converted = twitter_expand_entities($postarray['body'], $post, $picture); $postarray['body'] = $converted['body']; - $postarray['tag'] = implode(',', $converted['tags']); $postarray['created'] = DateTimeFormat::utc($post->created_at); $postarray['edited'] = DateTimeFormat::utc($post->created_at);