mirror of
https://github.com/friendica/friendica
synced 2025-04-26 03:50:12 +00:00
Issue 13041: API activities for reshared posts are now performed on the original posts
This commit is contained in:
parent
f74cc59530
commit
a5b00e9199
17 changed files with 107 additions and 30 deletions
|
@ -43,13 +43,11 @@ class Card extends BaseApi
|
|||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$id = $this->parameters['id'];
|
||||
|
||||
if (!Post::exists(['uri-id' => $id, 'uid' => [0, $uid]])) {
|
||||
throw new HTTPException\NotFoundException('Item with URI ID ' . $id . ' not found' . ($uid ? ' for user ' . $uid : '.'));
|
||||
if (!$post = Post::selectOriginal(['id'], ['uri-id' => $this->parameters['id'], 'uid' => [0, $uid]])) {
|
||||
throw new HTTPException\NotFoundException('Item with URI ID ' . $this->parameters['id'] . ' not found' . ($uid ? ' for user ' . $uid : '.'));
|
||||
}
|
||||
|
||||
$card = DI::mstdnCard()->createFromUriId($id);
|
||||
$card = DI::mstdnCard()->createFromUriId($post['id']);
|
||||
|
||||
System::jsonExit($card->toArray());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue