]> git.mxchange.org Git - friendica.git/commitdiff
We now change relationships not only for OStatus contacts
authorMichael <heluecht@pirati.ca>
Fri, 16 Mar 2018 06:58:54 +0000 (06:58 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 16 Mar 2018 06:58:54 +0000 (06:58 +0000)
mod/dfrn_notify.php
src/Model/Contact.php

index 2f4edafc5d8f37858854a1922b39bea8cb4cd8ad..db967290660a7e300bb4ae53516c701887fe1556 100644 (file)
@@ -18,6 +18,12 @@ require_once 'include/event.php';
 
 function dfrn_notify_post(App $a) {
        logger(__function__, LOGGER_TRACE);
+
+       if (empty($_POST)) {
+               require_once 'mod/salmon.php';
+               salmon_post($a);
+       }
+
        $dfrn_id      = ((x($_POST,'dfrn_id'))      ? notags(trim($_POST['dfrn_id']))   : '');
        $dfrn_version = ((x($_POST,'dfrn_version')) ? (float) $_POST['dfrn_version']    : 2.0);
        $challenge    = ((x($_POST,'challenge'))    ? notags(trim($_POST['challenge'])) : '');
index f05335cbaac64c0b529f535dd7a04aff5c20123c..ae9c40e6ec0a24b2255c044da950dfb1c2f3c054 100644 (file)
@@ -185,8 +185,6 @@ class Contact extends BaseObject
                        }
                } elseif ($contact['network'] == NETWORK_DIASPORA) {
                        Diaspora::sendUnshare($user, $contact);
-               //} elseif ($contact['network'] === NETWORK_DFRN) {
-               //      DFRN::deliver($user, $contact, 'placeholder', 1);
                }
        }
 
@@ -1377,7 +1375,7 @@ class Contact extends BaseObject
                }
 
                if (is_array($contact)) {
-                       if (($contact['network'] == NETWORK_OSTATUS && $contact['rel'] == CONTACT_IS_SHARING)
+                       if (($contact['rel'] == CONTACT_IS_SHARING)
                                || ($sharing && $contact['rel'] == CONTACT_IS_FOLLOWER)) {
                                dba::update('contact', ['rel' => CONTACT_IS_FRIEND, 'writable' => true],
                                                ['id' => $contact['id'], 'uid' => $importer['uid']]);