1
1
Fork 0

Merge pull request #9894 from annando/no-content-stored

Prevent "No post-content stored"
This commit is contained in:
Hypolite Petovan 2021-01-31 08:35:14 -05:00 committed by GitHub
commit 36f302e6e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View file

@ -1053,10 +1053,8 @@ class Item
$notify_type = Delivery::POST;
}
if (!in_array($item['verb'], self::ACTIVITIES) && !Post\Content::insert($item['uri-id'], $item)) {
// This shouldn't happen
Logger::warning('No post-content stored, quitting', ['guid' => $item['guid'], 'uri-id' => $item['uri-id'], 'causer-id' => ($item['causer-id'] ?? 0), 'post-type' => $item['post-type'], 'network' => $item['network']]);
return 0;
if (!in_array($item['verb'], self::ACTIVITIES)) {
Post\Content::insert($item['uri-id'], $item);
}
$body = $item['body'];

View file

@ -44,10 +44,6 @@ class Content
throw new BadMethodCallException('Empty URI_id');
}
if (DBA::exists('post-content', ['uri-id' => $uri_id])) {
return false;
}
$fields = DBStructure::getFieldsForTable('post-content', $data);
// Additionally assign the key fields