From 89f0ecf25d413d67fe96c1b9f0ee898d0864a49c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 7 Jan 2017 04:04:11 -0800 Subject: update the atom_entry hook --- include/feedutils.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/include/feedutils.php b/include/feedutils.php index b28a697fd..dfa3feed7 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -1178,9 +1178,6 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) { } - $o .= '' . "\r\n"; - $o .= '' . xmlify($item['parent_mid']) . '' . "\r\n"; - 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)); @@ -1240,11 +1237,21 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) { // if($mentioned) // $o .= $mentioned; - call_hooks('atom_entry', $o); - $o .= '' . "\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']; } -- cgit v1.2.3