}
$publish_at = date(DateTimeFormat::MYSQL, $publish_time);
- Post\Delayed::add($posting['item']['uri'], $posting['item'], $posting['notify'], false, $publish_at, $posting['taglist'], $posting['attachments']);
+ if (Post\Delayed::add($posting['item']['uri'], $posting['item'], $posting['notify'], Post\Delayed::PREPARED, $publish_at, $posting['taglist'], $posting['attachments'])) {
+ DI::pConfig()->set($item['uid'], 'system', 'last_publish', $publish_time);
+ }
}
}
Protocol::OSTATUS, Protocol::DFRN, Protocol::DIASPORA];
if ($filter === 'comments') {
- $condition[0] .= " AND `object-type` = ? ";
- $condition[] = Activity\ObjectType::COMMENT;
+ $condition[0] .= " AND `gravity` = ? ";
+ $condition[] = GRAVITY_COMMENT;
}
if ($owner['account-type'] != User::ACCOUNT_TYPE_COMMUNITY) {