require_once('mod/share.php');
require_once('mod/parse_url.php');
+require_once('include/text.php');
function fromgplus_install() {
register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
$_REQUEST['source'] = $source;
$_REQUEST['extid'] = NETWORK_GPLUS;
- if (isset($id))
- $_REQUEST['message_id'] = NETWORK_GPLUS.":".$id;
+ if (isset($id)) {
+ $_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_GPLUS.':'.$id);
+ }
// $_REQUEST['verb']
// $_REQUEST['parent']
//$_REQUEST["date"] = $item["date"];
//$_REQUEST["uri"] = $item["url"];
- if (strstr($item["url"], "facebook.com"))
+ if (strstr($item["url"], "facebook.com")) {
+ $hash = hash("ripemd128", item["url"]);
$_REQUEST["extid"] = NETWORK_FACEBOOK;
+ $_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_FACEBOOK.":".$hash);
+ }
if ($item["type"] == "link") {
$data = query_page_info($item["link"]);
$_REQUEST["source"] = $post->source;
$_REQUEST["extid"] = NETWORK_STATUSNET;
- if (isset($post->id))
- $_REQUEST['message_id'] = NETWORK_STATUSNET.":".$post->id;
+ if (isset($post->id)) {
+ $_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_STATUSNET.":".$post->id);
+ }
//$_REQUEST["date"] = $post->created_at;
$_REQUEST["source"] = $post->source;
$_REQUEST["extid"] = NETWORK_TWITTER;
- if (isset($post->id))
- $_REQUEST['message_id'] = NETWORK_TWITTER.":".$post->id;
+ if (isset($post->id)) {
+ $_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_TWITTER.":".$post->id);
+ }
//$_REQUEST["date"] = $post->created_at;