forked from friendica/friendica-addons
Merge pull request #385 from annando/1611-message-id
The URI of mirrored posts are now more standardized
This commit is contained in:
commit
54cd1d998c
|
@ -11,6 +11,7 @@ define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
|
||||||
|
|
||||||
require_once('mod/share.php');
|
require_once('mod/share.php');
|
||||||
require_once('mod/parse_url.php');
|
require_once('mod/parse_url.php');
|
||||||
|
require_once('include/text.php');
|
||||||
|
|
||||||
function fromgplus_install() {
|
function fromgplus_install() {
|
||||||
register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||||
|
@ -164,8 +165,9 @@ function fromgplus_post($a, $uid, $source, $body, $location, $coord, $id) {
|
||||||
$_REQUEST['source'] = $source;
|
$_REQUEST['source'] = $source;
|
||||||
$_REQUEST['extid'] = NETWORK_GPLUS;
|
$_REQUEST['extid'] = NETWORK_GPLUS;
|
||||||
|
|
||||||
if (isset($id))
|
if (isset($id)) {
|
||||||
$_REQUEST['message_id'] = NETWORK_GPLUS.":".$id;
|
$_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_GPLUS.':'.$id);
|
||||||
|
}
|
||||||
|
|
||||||
// $_REQUEST['verb']
|
// $_REQUEST['verb']
|
||||||
// $_REQUEST['parent']
|
// $_REQUEST['parent']
|
||||||
|
|
|
@ -155,8 +155,11 @@ function ifttt_message($uid, $item) {
|
||||||
//$_REQUEST["date"] = $item["date"];
|
//$_REQUEST["date"] = $item["date"];
|
||||||
//$_REQUEST["uri"] = $item["url"];
|
//$_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["extid"] = NETWORK_FACEBOOK;
|
||||||
|
$_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_FACEBOOK.":".$hash);
|
||||||
|
}
|
||||||
|
|
||||||
if ($item["type"] == "link") {
|
if ($item["type"] == "link") {
|
||||||
$data = query_page_info($item["link"]);
|
$data = query_page_info($item["link"]);
|
||||||
|
|
|
@ -872,8 +872,9 @@ function statusnet_fetchtimeline($a, $uid) {
|
||||||
$_REQUEST["source"] = $post->source;
|
$_REQUEST["source"] = $post->source;
|
||||||
$_REQUEST["extid"] = NETWORK_STATUSNET;
|
$_REQUEST["extid"] = NETWORK_STATUSNET;
|
||||||
|
|
||||||
if (isset($post->id))
|
if (isset($post->id)) {
|
||||||
$_REQUEST['message_id'] = NETWORK_STATUSNET.":".$post->id;
|
$_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_STATUSNET.":".$post->id);
|
||||||
|
}
|
||||||
|
|
||||||
//$_REQUEST["date"] = $post->created_at;
|
//$_REQUEST["date"] = $post->created_at;
|
||||||
|
|
||||||
|
|
|
@ -791,8 +791,9 @@ function twitter_fetchtimeline($a, $uid) {
|
||||||
$_REQUEST["source"] = $post->source;
|
$_REQUEST["source"] = $post->source;
|
||||||
$_REQUEST["extid"] = NETWORK_TWITTER;
|
$_REQUEST["extid"] = NETWORK_TWITTER;
|
||||||
|
|
||||||
if (isset($post->id))
|
if (isset($post->id)) {
|
||||||
$_REQUEST['message_id'] = NETWORK_TWITTER.":".$post->id;
|
$_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_TWITTER.":".$post->id);
|
||||||
|
}
|
||||||
|
|
||||||
//$_REQUEST["date"] = $post->created_at;
|
//$_REQUEST["date"] = $post->created_at;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue