Merge pull request #5806 from annando/issue-5804-2

Repeated posts from OStatus, ActitivyPub and Twitter are now shown as is
This commit is contained in:
Hypolite Petovan 2018-10-02 07:07:07 -04:00 committed by GitHub
commit e8fd13ff21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4828,7 +4828,17 @@ function api_share_as_retweet(&$item)
$body = trim($item["body"]); $body = trim($item["body"]);
if (Diaspora::isReshare($body, false) === false) { if (Diaspora::isReshare($body, false) === false) {
if ($item['author-id'] == $item['owner-id']) {
return false; return false;
} else {
// Reshares from OStatus, ActivityPub and Twitter
$reshared_item = $item;
$reshared_item['owner-id'] = $reshared_item['author-id'];
$reshared_item['owner-link'] = $reshared_item['author-link'];
$reshared_item['owner-name'] = $reshared_item['author-name'];
$reshared_item['owner-avatar'] = $reshared_item['author-avatar'];
return $reshared_item;
}
} }
/// @TODO "$1" should maybe mean '$1' ? /// @TODO "$1" should maybe mean '$1' ?