]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Item.php
Merge pull request #10116 from mexon/mat/addon-console-command
[friendica.git] / src / Model / Item.php
index 7a28ddd1c9eb577e5fff14e8a076aa659a0a2e62..48652a0e12fbf691f6ceea1bdb42b6bbed7c2838 100644 (file)
@@ -76,7 +76,7 @@ class Item
                'commented', 'created', 'edited', 'received', 'verb', 'object-type', 'postopts', 'plink',
                'wall', 'private', 'starred', 'origin', 'parent-origin', 'title', 'body', 'language',
                'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object',
-               'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
+               'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'mention',
                'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network',
                'owner-id', 'owner-link', 'owner-name', 'owner-avatar', 'owner-network', 'owner-contact-type',
                'causer-id', 'causer-link', 'causer-name', 'causer-avatar', 'causer-contact-type', 'causer-network',
@@ -318,14 +318,6 @@ class Item
 
                Post\DeliveryData::delete($item['uri-id']);
 
-               // When the permission set will be used in photo and events as well,
-               // this query here needs to be extended.
-               // @todo Currently deactivated. We need the permission set in the deletion process.
-               // This is a reminder to add the removal somewhere else.
-               //if (!empty($item['psid']) && !self::exists(['psid' => $item['psid'], 'deleted' => false])) {
-               //      DBA::delete('permissionset', ['id' => $item['psid']], ['cascade' => false]);
-               //}
-
                // If it's the parent of a comment thread, kill all the kids
                if ($item['gravity'] == GRAVITY_PARENT) {
                        self::markForDeletion(['parent' => $item['parent'], 'deleted' => false], $priority);
@@ -1190,7 +1182,7 @@ class Item
         */
        public static function distribute($itemid, $signed_text = '')
        {
-               $condition = ["`id` IN (SELECT `parent` FROM `post-view` WHERE `id` = ?)", $itemid];
+               $condition = ["`id` IN (SELECT `parent` FROM `post-user-view` WHERE `id` = ?)", $itemid];
                $parent = Post::selectFirst(['owner-id'], $condition);
                if (!DBA::isResult($parent)) {
                        Logger::warning('Item not found', ['condition' => $condition]);