define ( 'ACTIVITY_OBJ_GROUP', NAMESPACE_ACTIVITY_SCHEMA . 'group' );
define ( 'ACTIVITY_OBJ_TAGTERM', NAMESPACE_DFRN . '/tagterm' );
define ( 'ACTIVITY_OBJ_PROFILE', NAMESPACE_DFRN . '/profile' );
+define ( 'ACTIVITY_OBJ_QUESTION', 'http://activityschema.org/object/question' );
/**
* item weight for query ordering
$item["body"] = add_page_info_to_body(html2bbcode($xpath->query('atom:content/text()', $entry)->item(0)->nodeValue));
$item["object-type"] = $xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue;
- if ($item["object-type"] == ACTIVITY_OBJ_BOOKMARK) {
+ if (($item["object-type"] == ACTIVITY_OBJ_BOOKMARK) OR ($item["object-type"] == ACTIVITY_OBJ_EVENT)) {
$item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue;
$item["body"] = $xpath->query('atom:summary/text()', $entry)->item(0)->nodeValue;
- }
+ } elseif ($item["object-type"] == ACTIVITY_OBJ_QUESTION)
+ $item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue;
$item["object"] = $xml;
$item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue;
switch($rel) {
case "alternate":
$item["plink"] = $href;
+ if (($item["object-type"] == ACTIVITY_OBJ_QUESTION) OR
+ ($item["object-type"] == ACTIVITY_OBJ_EVENT))
+ $item["body"] .= add_page_info($href);
break;
case "ostatus:conversation":
$conversation = $href;