aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-14 19:04:36 -0700
committerfriendica <info@friendica.com>2014-09-14 19:04:36 -0700
commit5042847334838ebadf5205bbbb84f809942cfa66 (patch)
tree0a8e556a5b7fc8afef2c009d88c00dce5024703c /include
parentbcc9057d8c06d83c79830f370229a62dc3064d4f (diff)
downloadvolse-hubzilla-5042847334838ebadf5205bbbb84f809942cfa66.tar.gz
volse-hubzilla-5042847334838ebadf5205bbbb84f809942cfa66.tar.bz2
volse-hubzilla-5042847334838ebadf5205bbbb84f809942cfa66.zip
fix diaspora_retraction
Diffstat (limited to 'include')
-rwxr-xr-xinclude/diaspora.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 8a3eaf873..33404da74 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1966,19 +1966,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);
}
}
}