Issue 11853/11867: Fix reshare of public posts

This commit is contained in:
Michael 2022-08-27 21:22:49 +00:00
parent 1e4e7d5b58
commit 2173fb38e0
5 changed files with 24 additions and 27 deletions

View file

@ -51,9 +51,9 @@ class Activity extends BaseModule
$itemId = $this->parameters['id'];
if (in_array($verb, ['announce', 'unannounce'])) {
$item = Post::selectFirst(['network', 'uri-id', 'uid'], ['id' => $itemId]);
$item = Post::selectFirst(['network', 'uri-id'], ['id' => $itemId, 'uid' => [local_user(), 0]]);
if ($item['network'] == Protocol::DIASPORA) {
Diaspora::performReshare($item['uri-id'], $item['uid']);
Diaspora::performReshare($item['uri-id'], local_user());
}
}