mirror of
https://github.com/friendica/friendica
synced 2025-04-24 05:50:11 +00:00
Only search for empty quoted reshares (Diaspora type)
This commit is contained in:
parent
ca8a89ed1c
commit
f013c92487
4 changed files with 6 additions and 4 deletions
|
@ -50,7 +50,7 @@ class Unreblog extends BaseApi
|
|||
}
|
||||
|
||||
if ($item['network'] == Protocol::DIASPORA) {
|
||||
$item = Post::selectFirstForUser($uid, ['id'], ['quote-uri-id' => $this->parameters['id'], 'origin' => true, 'uid' => $uid]);
|
||||
$item = Post::selectFirstForUser($uid, ['id'], ['quote-uri-id' => $this->parameters['id'], 'body' => '', 'origin' => true, 'uid' => $uid]);
|
||||
if (empty($item['id'])) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class Activity extends BaseModule
|
|||
if (in_array($verb, ['announce', 'unannounce'])) {
|
||||
$item = Post::selectFirst(['network', 'uri-id'], ['id' => $itemId, 'uid' => [DI::userSession()->getLocalUserId(), 0]]);
|
||||
if ($item['network'] == Protocol::DIASPORA) {
|
||||
$quote = Post::selectFirst(['id'], ['quote-uri-id' => $item['uri-id'], 'origin' => true, 'uid' => DI::userSession()->getLocalUserId()]);
|
||||
$quote = Post::selectFirst(['id'], ['quote-uri-id' => $item['uri-id'], 'body' => '', 'origin' => true, 'uid' => DI::userSession()->getLocalUserId()]);
|
||||
if (!empty($quote['id'])) {
|
||||
if (!Item::markForDeletionById($quote['id'])) {
|
||||
throw new HTTPException\BadRequestException();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue