]> git.mxchange.org Git - friendica.git/commitdiff
Handling situations where "vid" is empty
authorMichael <heluecht@pirati.ca>
Sun, 31 May 2020 14:38:00 +0000 (14:38 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 31 May 2020 14:38:00 +0000 (14:38 +0000)
include/conversation.php
mod/ping.php

index 6fdfd30b466502e2070968a7f1c3acfce22be7cf..e623c9320bf911e3fb5a457f1adb58f9caeade0e 100644 (file)
@@ -771,7 +771,7 @@ function conversation_add_children(array $parents, $block_authors, $order, $uid)
        $items = [];
 
        foreach ($parents AS $parent) {
        $items = [];
 
        foreach ($parents AS $parent) {
-               $condition = ["`item`.`parent-uri` = ? AND `item`.`uid` IN (0, ?) AND `vid` != ?",
+               $condition = ["`item`.`parent-uri` = ? AND `item`.`uid` IN (0, ?) AND (`vid` != ? OR `vid` IS NULL)",
                        $parent['uri'], $uid, Verb::getID(Activity::FOLLOW)];
                $items = conversation_fetch_items($parent, $items, $condition, $block_authors, $params);
        }
                        $parent['uri'], $uid, Verb::getID(Activity::FOLLOW)];
                $items = conversation_fetch_items($parent, $items, $condition, $block_authors, $params);
        }
index 73e759107b7f3eca0f1812e10bd4d0f39f3b627f..6b3b015ac80e32bcc09839dad0d5e534ea826061 100644 (file)
@@ -136,7 +136,7 @@ function ping_init(App $a)
 
                $notifs = ping_get_notifications(local_user());
 
 
                $notifs = ping_get_notifications(local_user());
 
-               $condition = ["`unseen` AND `uid` = ? AND `contact-id` != ? AND `vid` != ?",
+               $condition = ["`unseen` AND `uid` = ? AND `contact-id` != ? AND (`vid` != ? OR `vid` IS NULL)",
                        local_user(), local_user(), Verb::getID(Activity::FOLLOW)];
                $fields = ['id', 'parent', 'verb', 'author-name', 'unseen', 'author-link', 'author-avatar', 'contact-avatar',
                        'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid', 'wall', 'activity'];
                        local_user(), local_user(), Verb::getID(Activity::FOLLOW)];
                $fields = ['id', 'parent', 'verb', 'author-name', 'unseen', 'author-link', 'author-avatar', 'contact-avatar',
                        'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid', 'wall', 'activity'];