if ($contact['network'] != NETWORK_FEED) {
$datarray["guid"] = get_guid(32);
unset($datarray["plink"]);
- $datarray["uri"] = item_new_uri($a->get_hostname(),$contact['uid']);
+ $datarray["uri"] = item_new_uri($a->get_hostname(),$contact['uid'], $datarray["guid"]);
$datarray["parent-uri"] = $datarray["uri"];
$datarray["extid"] = $contact['network'];
$urlpart = parse_url($datarray2['author-link']);
* @param int $uid
* @return string
*/
-function item_new_uri($hostname,$uid) {
+function item_new_uri($hostname,$uid, $guid = "") {
do {
$dups = false;
- $hash = random_string();
+
+ if ($guid == "")
+ $hash = get_guid(32);
+ else {
+ $hash = $guid;
+ $guid = "";
+ }
$uri = "urn:X-dfrn:" . $hostname . ':' . $uid . ':' . $hash;
$notify_type = (($parent) ? 'comment-new' : 'wall-new' );
- $uri = (($message_id) ? $message_id : item_new_uri($a->get_hostname(),$profile_uid));
+ $uri = (($message_id) ? $message_id : item_new_uri($a->get_hostname(),$profile_uid, $guid));
// Fallback so that we alway have a thr-parent
if(!$thr_parent)