$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);
}
*/
function conversation_fetch_items(array $parent, array $items, array $condition, bool $block_authors, array $params) {
if ($block_authors) {
- $condition[0] .= "AND NOT `author`.`hidden`";
+ $condition[0] .= " AND NOT `author`.`hidden`";
}
$thread_items = Item::selectForUser(local_user(), array_merge(Item::DISPLAY_FIELDLIST, ['contact-uid', 'gravity']), $condition, $params);
$block_link = '';
$ignore_link = '';
- if (local_user() && local_user() == $item['uid'] && $item['parent'] == $item['id'] && !$item['self']) {
+ if (local_user() && local_user() == $item['uid'] && $item['gravity'] == GRAVITY_PARENT && !$item['self']) {
$sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;';
}