]> git.mxchange.org Git - friendica.git/commitdiff
dissolve relationship (new protocol) working
authorFriendika <info@friendika.com>
Wed, 26 Jan 2011 10:32:00 +0000 (02:32 -0800)
committerFriendika <info@friendika.com>
Wed, 26 Jan 2011 10:32:00 +0000 (02:32 -0800)
include/items.php
mod/contacts.php
mod/dfrn_notify.php

index 7b0ff2ce6b09e0fbd936012674c6f1fe61585335..e238280fc83aae45c566eb005b8b498b8ea95f9d 100644 (file)
@@ -1157,6 +1157,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0) {
                                        continue;
                                }
                                $datarray = get_atom_elements($feed,$item);
+
                                if($contact['network'] === 'stat') {
                                        if(strlen($datarray['title']))
                                                unset($datarray['title']);
@@ -1167,6 +1168,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0) {
                                        );
                                        $datarray['last-child'] = 1;
                                }
+
                                if(($contact['network'] === 'feed') || (! strlen($contact['notify']))) {
                                        // one way feed - no remote comment ability
                                        $datarray['last-child'] = 0;
index 7236a200d5a94b090fd76c67cb9bc7098eb29927..83f73140bdf603203a8e5aaafb315c840a3a1fb1 100644 (file)
@@ -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');
index 6c3ae022b2f00dfe7bebebacfac76e77a502bb62..f581702d8e23bcce60c3abd5ac327964a7a0c4c2 100644 (file)
@@ -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