+ $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();
+ }
+ } else {
+ Diaspora::performReshare($item['uri-id'], DI::userSession()->getLocalUserId());
+ }
+ $handled = true;