aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorPaolo Tacconi <p.tacconi@giunti.it>2014-09-15 10:01:25 +0200
committerPaolo Tacconi <p.tacconi@giunti.it>2014-09-15 10:01:25 +0200
commit4f793069bf4aafcfe77d50e47690173104ef23c7 (patch)
tree7fe1bfcb18672300bf14967338690ea4fa51e640 /include/diaspora.php
parented7f3001c1c1deec5076ae12114e5c42865b6251 (diff)
parent58aad83e5cb0edaf1ccc543147030e782c5e7ba9 (diff)
downloadvolse-hubzilla-4f793069bf4aafcfe77d50e47690173104ef23c7.tar.gz
volse-hubzilla-4f793069bf4aafcfe77d50e47690173104ef23c7.tar.bz2
volse-hubzilla-4f793069bf4aafcfe77d50e47690173104ef23c7.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-xinclude/diaspora.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 8a3eaf873..ea3c78bfe 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -142,6 +142,7 @@ function diaspora_process_outbound($arr) {
'cmd' => $cmd,
'expire' => $expire,
'mail' => $mail,
+ 'location' => $location,
'fsuggest' => $fsuggest,
'normal_mode' => $normal_mode,
'packet_type' => $packet_type,
@@ -150,6 +151,10 @@ function diaspora_process_outbound($arr) {
*/
+ if($arr['location'])
+ return;
+
+
$target_item = $arr['target_item'];
if($target_item && array_key_exists('item_flags',$target_item) && ($target_item['item_flags'] & ITEM_OBSCURED)) {
@@ -161,6 +166,7 @@ function diaspora_process_outbound($arr) {
}
+
if($arr['env_recips']) {
$hashes = array();
@@ -1966,19 +1972,16 @@ function diaspora_retraction($importer,$xml) {
if($type === 'Person') {
require_once('include/Contact.php');
- contact_remove($contact['id']);
+ contact_remove($importer['channel_id'],$contact['abook_id']);
}
elseif($type === 'Post') {
- $r = q("select * from item where guid = '%s' and uid = %d and not file like '%%[%%' limit 1",
+ $r = q("select * from item where mid = '%s' and uid = %d limit 1",
dbesc('guid'),
intval($importer['channel_id'])
);
if(count($r)) {
- if(link_compare($r[0]['author-link'],$contact['url'])) {
- q("update item set `deleted` = 1, `changed` = '%s' where `id` = %d",
- dbesc(datetime_convert()),
- intval($r[0]['id'])
- );
+ if(link_compare($r[0]['author_xchan'],$contact['xchan_hash'])) {
+ drop_item($r[0]['id'],false);
}
}
}