+ elseif ($notify) {
+ // At first store the original post
+ $r = item_store($datarray, false, false);
+
+ // Then create a new guid and uri and post it again as a forwarded post
+ $datarray["guid"] = get_guid(32);
+ $datarray["uri"] = item_new_uri($a->get_hostname(),$importer['uid']);
+ $r = q("SELECT `id`,`url`,`name`,`photo`,`network` FROM `contact` WHERE `uid` = %d AND `self`", intval($importer['uid']));
+ if (count($r)) {
+ $datarray['contact-id'] = $r[0]["id"];
+
+ $datarray['owner-name'] = $r[0]["name"];
+ $datarray['owner-link'] = $r[0]["url"];
+ $datarray['owner-avatar'] = $r[0]["photo"];
+ }