mirror of
https://github.com/friendica/friendica
synced 2024-12-23 03:20:15 +00:00
Merge pull request #12390 from annando/fixes
Only reshare the author's posts on `MIRROR_NATIVE_RESHARE`
This commit is contained in:
commit
baf2f7565a
2 changed files with 7 additions and 2 deletions
|
@ -165,7 +165,7 @@ class Cron
|
|||
Logger::info('Removing failed deliveries', ['inbox' => $delivery['inbox'], 'failed' => $delivery['failed']]);
|
||||
Post\Delivery::removeFailed($delivery['inbox']);
|
||||
}
|
||||
|
||||
|
||||
if ($delivery['failed'] == 0) {
|
||||
$result = ActivityPub\Delivery::deliver($delivery['inbox']);
|
||||
Logger::info('Directly deliver inbox', ['inbox' => $delivery['inbox'], 'result' => $result['success']]);
|
||||
|
|
|
@ -2283,7 +2283,12 @@ class Item
|
|||
return;
|
||||
}
|
||||
|
||||
if (!DBA::exists('contact', ['id' => $item['contact-id'], 'remote_self' => Contact::MIRROR_NATIVE_RESHARE])) {
|
||||
$cdata = Contact::getPublicAndUserContactID($item['author-id'], $item['uid']);
|
||||
if (empty($cdata['user']) || ($cdata['user'] != $item['contact-id'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!DBA::exists('contact', ['id' => $cdata['user'], 'remote_self' => Contact::MIRROR_NATIVE_RESHARE])) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue