1
0
Fork 0

Test code removed

This commit is contained in:
Michael 2021-12-02 06:36:09 +00:00
parent bd2ee581d3
commit 4a90e6b1f0
2 changed files with 2 additions and 8 deletions

View file

@ -50,17 +50,13 @@ class Activity extends BaseModule
$verb = $this->parameters['verb'];
$itemId = $this->parameters['id'];
Logger::info('Blubb-1', ['id' => $itemId, 'verb' => $verb]);
if (in_array($verb, ['announce', 'unannounce'])) {
$item = Post::selectFirst(['network', 'uri-id', 'uid'], ['id' => $itemId]);
Logger::info('Blubb-2', ['id' => $itemId, 'item' => $item]);
if ($item['network'] == Protocol::DIASPORA) {
Logger::info('Blubb-3', ['id' => $itemId]);
$id = Diaspora::performReshare($item['uri-id'], $item['uid']);
Logger::info('Blubb-ende', ['id' => $id]);
Diaspora::performReshare($item['uri-id'], $item['uid']);
}
}
Logger::info('Blubb-activity', ['id' => $itemId]);
if (!Item::performActivity($itemId, $verb, local_user())) {
throw new HTTPException\BadRequestException();

View file

@ -4059,7 +4059,6 @@ class Diaspora
$fields = ['uri-id', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
$item = Post::selectFirst($fields, ['uri-id' => $UriId, 'uid' => [$uid, 0], 'private' => [Item::PUBLIC, Item::UNLISTED]]);
if (!DBA::isResult($item)) {
Logger::info('Blubb-4', ['uri-id' => $UriId, 'uid' => $uid]);
return 0;
}
@ -4100,7 +4099,6 @@ class Diaspora
} else {
$item['private'] = Item::PUBLIC;
}
Logger::info('Blubb-5', ['uri-id' => $UriId, 'uid' => $uid, 'item' => $item]);
return Item::insert($item, true);
}