diff options
author | Friendika <info@friendika.com> | 2011-01-26 02:32:00 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-01-26 02:32:00 -0800 |
commit | c7ace10ffb4a9f7dcb5e24eb4db25a4cfb449de7 (patch) | |
tree | b69c1fa604d2c7317c6083088c8af28435793dd8 /mod | |
parent | 2fc89deaeae0341aa12b6b811927e793011055d1 (diff) | |
download | volse-hubzilla-c7ace10ffb4a9f7dcb5e24eb4db25a4cfb449de7.tar.gz volse-hubzilla-c7ace10ffb4a9f7dcb5e24eb4db25a4cfb449de7.tar.bz2 volse-hubzilla-c7ace10ffb4a9f7dcb5e24eb4db25a4cfb449de7.zip |
dissolve relationship (new protocol) working
Diffstat (limited to 'mod')
-rw-r--r-- | mod/contacts.php | 6 | ||||
-rw-r--r-- | mod/dfrn_notify.php | 24 |
2 files changed, 19 insertions, 11 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 7236a200d..83f73140b 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -177,6 +177,12 @@ function contacts_content(&$a) { } } + if($orig_record[0]['network'] === 'dfrn') { + require_once('include/items.php'); + dfrn_deliver($a->user,$orig_record[0],'placeholder', 1); + } + + contact_remove($contact_id); notice( t('Contact has been removed.') . EOL ); goaway($a->get_baseurl() . '/contacts'); diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 6c3ae022b..f581702d8 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -75,6 +75,19 @@ function dfrn_notify_post(&$a) { logger('dfrn_notify: received notify from ' . $importer['name'] . ' for ' . $importer['username']); logger('dfrn_notify: data: ' . $data, LOGGER_DATA); + if($dissolve == 1) { + + /** + * Relationship is dissolved permanently + */ + + require_once('include/Contact.php'); + contact_remove($importer['id']); + logger('relationship dissolved : ' . $importer['name'] . ' dissolved ' . $importer['username']); + xml_status(0); + + } + if(strlen($key)) { $rawkey = hex2bin(trim($key)); logger('rino: md5 raw key: ' . md5($rawkey)); @@ -94,17 +107,6 @@ function dfrn_notify_post(&$a) { - if($dissolve == 1) { - - /** - * Relationship is dissolved permanently - */ - - contact_remove($importer['id']); - logger('relationship dissolved : ' . $importer['name'] . ' dissolved ' . $importer['username']); - xml_status(0); - - } if($importer['readonly']) { // We aren't receiving stuff from this person. But we will quietly ignore them |