]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact.php
Fix method name typos in Model\Post\UserNotification
[friendica.git] / src / Model / Contact.php
index bfbeb90024474132fa60320ef9955fc19eb0f274..18e041ab9849c1f18611f925b81e0e534deef8f1 100644 (file)
@@ -872,7 +872,11 @@ class Contact
                // A null value here means the remote network doesn't support explicit follow revocation, we can still
                // break the locally recorded relationship
                if ($result !== false) {
-                       DBA::update('contact', ['rel' => $contact['rel'] == self::FRIEND ? self::SHARING : self::NOTHING], ['id' => $contact['id']]);
+                       if ($contact['rel'] == self::FRIEND) {
+                               self::update(['rel' => self::SHARING], ['id' => $contact['id']]);
+                       } else {
+                               self::remove($contact['id']);
+                       }
                }
 
                return $result;
@@ -2701,7 +2705,7 @@ class Contact
                        // Ensure to always have the correct network type, independent from the connection request method
                        self::updateFromProbe($contact['id']);
 
-                       Post\UserNotification::insertNotication($contact['id'], Verb::getID(Activity::FOLLOW), $importer['uid']);
+                       Post\UserNotification::insertNotification($contact['id'], Verb::getID(Activity::FOLLOW), $importer['uid']);
 
                        return true;
                } else {
@@ -2732,7 +2736,7 @@ class Contact
 
                        self::updateAvatar($contact_id, $photo, true);
 
-                       Post\UserNotification::insertNotication($contact_id, Verb::getID(Activity::FOLLOW), $importer['uid']);
+                       Post\UserNotification::insertNotification($contact_id, Verb::getID(Activity::FOLLOW), $importer['uid']);
 
                        $contact_record = DBA::selectFirst('contact', ['id', 'network', 'name', 'url', 'photo'], ['id' => $contact_id]);