mirror of
https://github.com/friendica/friendica
synced 2025-04-26 06:30:11 +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
|
@ -42,7 +42,7 @@ class Mute extends BaseApi
|
|||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$item = Post::selectFirstForUser($uid, ['id', 'gravity'], ['uri-id' => $this->parameters['id'], 'uid' => [$uid, 0]]);
|
||||
$item = Post::selectOriginalForUser($uid, ['id', 'gravity'], ['uri-id' => $this->parameters['id'], 'uid' => [$uid, 0]]);
|
||||
if (!DBA::isResult($item)) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class Mute extends BaseApi
|
|||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting posts can be muted'));
|
||||
}
|
||||
|
||||
Post\ThreadUser::setIgnored($this->parameters['id'], $uid, true);
|
||||
Post\ThreadUser::setIgnored($item['id'], $uid, true);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue