if (count($r)) {
$postarray['thr-parent'] = $r[0]["uri"];
$postarray['parent-uri'] = $r[0]["parent-uri"];
+ $postarray['object-type'] = ACTIVITY_OBJ_COMMENT;
} else {
$r = q("SELECT * FROM `item` WHERE `extid` = '%s' AND `uid` = %d LIMIT 1",
dbesc($parent),
if (count($r)) {
$postarray['thr-parent'] = $r[0]['uri'];
$postarray['parent-uri'] = $r[0]['parent-uri'];
+ $postarray['object-type'] = ACTIVITY_OBJ_COMMENT;
} else {
$postarray['thr-parent'] = $postarray['uri'];
$postarray['parent-uri'] = $postarray['uri'];
+ $postarray['object-type'] = ACTIVITY_OBJ_NOTE;
}
}
}
// Don't create accounts of people who just comment something
$create_user = false;
- } else
+ } else {
$postarray['parent-uri'] = $postarray['uri'];
+ $postarray['object-type'] = ACTIVITY_OBJ_NOTE;
+ }
if ($contactid == 0) {
$contactid = statusnet_fetch_contact($uid, $post->user, $create_user);
$postarray['contact-id'] = $contactid;
$postarray['verb'] = ACTIVITY_POST;
+
$postarray['author-name'] = $postarray['owner-name'];
$postarray['author-link'] = $postarray['owner-link'];
$postarray['author-avatar'] = $postarray['owner-avatar'];
'to_email' => $user[0]['email'],
'uid' => $user[0]['uid'],
'item' => $postarray,
- 'link' => $a->get_baseurl() . '/display/' . $user[0]['nickname'] . '/' . $top_item,
+ //'link' => $a->get_baseurl() . '/display/' . $user[0]['nickname'] . '/' . $top_item,
+ 'link' => $a->get_baseurl().'/display/'.get_item_guid($top_item),
'source_name' => $postarray['author-name'],
'source_link' => $postarray['author-link'],
'source_photo' => $postarray['author-avatar'],
'to_email' => $u[0]['email'],
'uid' => $u[0]['uid'],
'item' => $postarray,
- 'link' => $a->get_baseurl() . '/display/' . $u[0]['nickname'] . '/' . $item,
+ //'link' => $a->get_baseurl() . '/display/' . $u[0]['nickname'] . '/' . $item,
+ 'link' => $a->get_baseurl().'/display/'.get_item_guid($item),
'source_name' => $postarray['author-name'],
'source_link' => $postarray['author-link'],
'source_photo' => $postarray['author-avatar'],