aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-22 18:40:00 -0700
committerFriendika <info@friendika.com>2011-05-22 18:40:00 -0700
commit44a22c29155fa3beeed7cd5d0add30818e409891 (patch)
treefe89c42ebff5947d312f07120f6e47de6b9949dd /include/items.php
parenta803652653a3c354c697d9c58e86d98d814a388a (diff)
downloadvolse-hubzilla-44a22c29155fa3beeed7cd5d0add30818e409891.tar.gz
volse-hubzilla-44a22c29155fa3beeed7cd5d0add30818e409891.tar.bz2
volse-hubzilla-44a22c29155fa3beeed7cd5d0add30818e409891.zip
more improvements in twitter handling, reduce duplicates from FB when double friended
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 55b17158a..cbf5e4d24 100644
--- a/include/items.php
+++ b/include/items.php
@@ -384,6 +384,9 @@ function get_atom_elements($feed,$item) {
else
$res['private'] = 0;
+ $extid = $item->get_item_tags(NAMESPACE_DFRN,'extid');
+ if($extid && $extid[0]['data'])
+ $res['extid'] = $extid[0]['data'];
$rawlocation = $item->get_item_tags(NAMESPACE_DFRN, 'location');
if($rawlocation)
@@ -634,6 +637,7 @@ function item_store($arr,$force_parent = false) {
$arr['wall'] = ((x($arr,'wall')) ? intval($arr['wall']) : 0);
$arr['uri'] = ((x($arr,'uri')) ? notags(trim($arr['uri'])) : random_string());
+ $arr['extid'] = ((x($arr,'extid')) ? notags(trim($arr['extid'])) : '');
$arr['author-name'] = ((x($arr,'author-name')) ? notags(trim($arr['author-name'])) : '');
$arr['author-link'] = ((x($arr,'author-link')) ? notags(trim($arr['author-link'])) : '');
$arr['author-avatar'] = ((x($arr,'author-avatar')) ? notags(trim($arr['author-avatar'])) : '');
@@ -1568,6 +1572,10 @@ function atom_entry($item,$type,$author,$owner,$comment = false) {
if(($item['private']) || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid']))
$o .= '<dfrn:private>1</dfrn:private>' . "\r\n";
+ if($item['extid'])
+ $o .= '<dfrn:extid>' . $item['extid'] . '</dfrn:extid>' . "\r\n";
+
+
$verb = construct_verb($item);
$o .= '<as:verb>' . xmlify($verb) . '</as:verb>' . "\r\n";
$actobj = construct_activity_object($item);