+
+ // refetch the contact array
+ $contact = self::contact_by_handle($importer["uid"],$author);
+
+ // If we are now friends, we are sending a share message.
+ // Normally we needn't to do so, but the first message could have been vanished.
+ if (in_array($contact["rel"], array(CONTACT_IS_FRIEND, CONTACT_IS_FOLLOWER))) {
+ $u = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1", intval($importer["uid"]));
+ if($u) {
+ logger("Sending share message to author ".$author." - Contact: ".$contact["id"]." - User: ".$importer["uid"], LOGGER_DEBUG);
+ $ret = self::send_share($u[0], $contact);
+ }
+ }