+ if ($mail) {
+ $item["body"] = $body;
+ $atom = dfrn_mail($item, $owner);
+ } elseif ($fsuggest) {
+ $atom = dfrn_fsuggest($item, $owner);
+ // q("DELETE FROM `fsuggest` WHERE `id` = %d LIMIT 1", intval($item['id'])
+ } elseif ($relocate)
+ $atom = dfrn_relocate($owner, $uid);
+ elseif($followup) {
+ $msgitems = array();
+ foreach($items as $item) { // there is only one item
+ if(!$item['parent'])
+ continue;
+ if($item['id'] == $item_id) {
+ logger('followup: item: ' . print_r($item,true), LOGGER_DATA);
+ $msgitems[] = $item;
+ }
+ }
+ $atom = dfrn_entries($msgitems,$owner);
+ } else {
+ $msgitems = array();
+ foreach($items as $item) {
+ if(!$item['parent'])
+ continue;
+
+ // private emails may be in included in public conversations. Filter them.
+ if(($public_message) && $item['private'])
+ continue;
+
+ $item_contact = get_item_contact($item,$icontacts);
+ if(!$item_contact)
+ continue;
+
+ if($normal_mode) {
+ if($item_id == $item['id'] || $item['id'] == $item['parent']) {
+ $item["entry:comment-allow"] = true;
+ $item["entry:cid"] = (($top_level) ? $contact['id'] : 0);
+ $msgitems[] = $item;
+ }
+ } else {
+ $item["entry:comment-allow"] = true;
+ $msgitems[] = $item;
+ }
+ }
+ $atom = dfrn_entries($msgitems,$owner);
+ }
+/*