]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact.php
The "file" variable isn't stored anymore in the item table
[friendica.git] / src / Model / Contact.php
index e504849f7c11fbf5dbcfd337cd1af685ad13922b..fe9869c6f88065386a8a918b11ac88e555e5096a 100644 (file)
@@ -1064,15 +1064,17 @@ class Contact extends BaseObject
 
                $contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id');
 
-               $condition = ["`$contact` = ? AND `verb` = ? AND " . $sql,
-                       $author_id, ACTIVITY_POST, local_user()];
+               $condition = ["`$contact` = ? AND `gravity` IN (?, ?) AND " . $sql,
+                       $author_id, GRAVITY_PARENT, GRAVITY_COMMENT, local_user()];
                $params = ['order' => ['created' => true],
                        'limit' => [$a->pager['start'], $a->pager['itemspage']]];
-               $r = Item::select(local_user(), [], $condition, $params);
+               $r = Item::selectForUser(local_user(), [], $condition, $params);
 
-               $o = conversation($a, dba::inArray($r), 'contact-posts', false);
+               $items = Item::inArray($r);
 
-               $o .= alt_pager($a, count($r));
+               $o = conversation($a, $items, 'contact-posts', false);
+
+               $o .= alt_pager($a, count($items));
 
                return $o;
        }