$item_id = (($a->argc > 1) ? notags(trim($a->argv[1])) : 0);
$condition = ["`parent` = ? OR `parent-uri` = ? AND `parent` = `id`", $item_id, $item_id];
- $item = Item::selectFirst(local_user(), [], $condition);
+ $item = Item::selectFirst([], $condition);
if (empty($item_id) || !DBM::is_result($item)) {
logger('subthread: no item ' . $item_id);
$arr = [];
- $arr['guid'] = get_guid(32);
+ $arr['guid'] = System::createGUID(32);
$arr['uri'] = $uri;
$arr['uid'] = $owner_uid;
$arr['contact-id'] = $contact['id'];
- $arr['type'] = 'activity';
$arr['wall'] = $item['wall'];
$arr['origin'] = 1;
- $arr['gravity'] = GRAVITY_LIKE;
+ $arr['gravity'] = GRAVITY_ACTIVITY;
$arr['parent'] = $item['id'];
$arr['parent-uri'] = $item['uri'];
$arr['thr-parent'] = $item['uri'];