update the atom_entry hook

This commit is contained in:
zotlabs 2017-01-07 04:04:11 -08:00
parent fb059bfdc3
commit 89f0ecf25d

View File

@ -1178,9 +1178,6 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
} }
$o .= '<link rel="ostatus:conversation" href="' . xmlify($item['parent_mid']) . '"/>' . "\r\n";
$o .= '<ostatus:conversation>' . xmlify($item['parent_mid']) . '</ostatus:conversation>' . "\r\n";
if(activity_match($item['obj_type'],ACTIVITY_OBJ_EVENT) && activity_match($item['verb'],ACTIVITY_POST)) { if(activity_match($item['obj_type'],ACTIVITY_OBJ_EVENT) && activity_match($item['verb'],ACTIVITY_POST)) {
$obj = ((is_array($item['obj'])) ? $item['obj'] : json_decode($item['obj'],true)); $obj = ((is_array($item['obj'])) ? $item['obj'] : json_decode($item['obj'],true));
@ -1240,11 +1237,21 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
// if($mentioned) // if($mentioned)
// $o .= $mentioned; // $o .= $mentioned;
call_hooks('atom_entry', $o);
$o .= '</entry>' . "\r\n"; $o .= '</entry>' . "\r\n";
return $o; $x = [
'item' => $item,
'type' => $type,
'author' => $author,
'owner' => $owner,
'comment' => $comment,
'abook_id => $cid,
'entry' => $o
];
call_hooks('atom_entry', $x);
return $x['entry'];
} }