Use gravity instead of verb

This commit is contained in:
Michael 2018-06-27 18:09:33 +00:00
parent 8c2f91573a
commit 76dab3b2d7
14 changed files with 59 additions and 56 deletions

View file

@ -1064,8 +1064,8 @@ 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::selectForUser(local_user(), [], $condition, $params);