- foreach($items as $item) {
- if($item['deleted']) {
- $atom .= replace_macros($tomb_template, array(
- '$id' => xmlify("urn:X-dfrn:{$item['hash']}"),
- '$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , 'Y-m-d\Th:i:s\Z'))
- ));
- }
- else {
- foreach($contacts as $contact) {
- if($item['contact-id'] == $contact['id']) {
- if($item['parent'] == $item['id']) {
- $atom .= replace_macros($item_template, array(
- '$name' => xmlify($contact['name']),
- '$profile_page' => xmlify($contact['url']),
- '$thumb' => xmlify($contact['thumb']),
- '$item_id' => xmlify("urn:X-dfrn:{$item['hash']}"),
- '$title' => xmlify($item['title']),
- '$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , 'Y-m-d\Th:i:s\Z')),
- '$content' =>xmlify($item['body'])
- ));
- }
- else {
- $atom .= replace_macros($cmnt_template, array(
- '$name' => xmlify($contact['name']),
- '$profile_page' => xmlify($contact['url']),
- '$thumb' => xmlify($contact['thumb']),
- '$item_id' => xmlify("urn:X-dfrn:{$item['hash']}"),
- '$title' => xmlify($item['title']),
- '$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , 'Y-m-d\Th:i:s\Z')),
- '$content' =>xmlify($item['body']),
- '$parent_id' => xmlify("urn:X-dfrn:{$items[0]['hash']}")
- ));
- }
- }
+ if($followup) {
+ foreach($items as $item) { // there is only one item
+ if($item['id'] == $item_id) {
+ logger('notifier: followup: item: ' . print_r($item,true), LOGGER_DATA);
+ $slap = atom_entry($item,'html',$owner,$owner,false);
+ $atom .= atom_entry($item,'text',$owner,$owner,false);