]> git.mxchange.org Git - friendica.git/commitdiff
Prevent "No post-content stored"
authorMichael <heluecht@pirati.ca>
Sun, 31 Jan 2021 12:26:25 +0000 (12:26 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 31 Jan 2021 12:26:25 +0000 (12:26 +0000)
src/Model/Item.php
src/Model/Post/Content.php

index 7c507498bb6caeb4930ee0408ab2de6530192687..6d882463fba186b2fff32f86179f41bcdd1157b1 100644 (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'];
index 5d9aaf62d637249c6fe82d2aef902cce633b9f00..cdca7e8ca3aab1d7bddf39f95e1f99383a334c0d 100644 (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