Merge pull request #6113 from annando/api-retweet

API: The wrong user had been shown for repeated posts
This commit is contained in:
Hypolite Petovan 2018-11-11 16:53:26 -05:00 committed by GitHub
commit 0ed3b1e38a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2923,6 +2923,7 @@ function api_format_items($r, $user_info, $filter_user = false, $type = "json")
$retweeted_item = api_share_as_retweet($item); $retweeted_item = api_share_as_retweet($item);
if ($retweeted_item !== false) { if ($retweeted_item !== false) {
$retweeted_status = $status; $retweeted_status = $status;
$status['user'] = $status['friendica_owner'];
try { try {
$retweeted_status["user"] = api_get_user($a, $retweeted_item["author-id"]); $retweeted_status["user"] = api_get_user($a, $retweeted_item["author-id"]);
} catch (BadRequestException $e) { } catch (BadRequestException $e) {