Merge pull request #757 from MrPetovan/feature/3218-twitter-normalize-mentions

[twitter] Shorten foreign share mention
This commit is contained in:
Michael Vogel 2018-10-18 05:50:04 +02:00 committed by GitHub
commit fdc45bdcba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1896,7 +1896,7 @@ function twitter_convert_share(array $attributes, array $author_contact, $conten
if ($author_contact['network'] == Protocol::TWITTER) { if ($author_contact['network'] == Protocol::TWITTER) {
$mention = '@' . $author_contact['nickname']; $mention = '@' . $author_contact['nickname'];
} else { } else {
$mention = Protocol::formatMention($attributes['profile'], $attributes['author']); $mention = $author_contact['addr'];
} }
return ($is_quote_share ? "\n\n" : '' ) . 'RT ' . $mention . ': ' . $content . "\n\n" . $attributes['link']; return ($is_quote_share ? "\n\n" : '' ) . 'RT ' . $mention . ': ' . $content . "\n\n" . $attributes['link'];