We only need to fetch the content once

This commit is contained in:
Michael 2019-01-20 22:56:33 +00:00
parent 9e7c59481f
commit e2427eb9da

View file

@ -553,10 +553,7 @@ class Transmitter
// Only check for a reshare, if it is a real reshare and no quoted reshare // Only check for a reshare, if it is a real reshare and no quoted reshare
if (strpos($item['body'], "[share") === 0) { if (strpos($item['body'], "[share") === 0) {
$announce = api_share_as_retweet($item); $announce = api_share_as_retweet($item);
if (!empty($announce['plink'])) { $reshared = !empty($announce['plink']);
$data = ActivityPub::fetchContent($announce['plink'], $item['uid']);
$reshared = !empty($data);
}
} }
if ($reshared) { if ($reshared) {