]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact.php
Merge pull request #10836 from nupplaphil/feat/depository_permissionset
[friendica.git] / src / Model / Contact.php
index 0c7fd3909e4cc55497de569352979a4516925da5..cbe370a4aa8250d35a899d3b1de59d2e32105adf 100644 (file)
@@ -832,11 +832,11 @@ class Contact
         * @param array   $user    User unfriending
         * @param array   $contact Contact (uid != 0) unfriended
         * @param boolean $two_way Revoke eventual inbound follow as well
-        * @return bool|null true if successful, false if not, null if no action was performed
+        * @return bool|null true if successful, false if not, null if no remote action was performed
         * @throws HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function terminateFriendship(array $user, array $contact): bool
+       public static function terminateFriendship(array $user, array $contact): ?bool
        {
                $result = Protocol::terminateFriendship($user, $contact);
 
@@ -1722,7 +1722,7 @@ class Contact
         * Get avatar link for given contact id
         *
         * @param integer $cid     contact id
-        * @param string  $size    One of the ProxyUtils::SIZE_* constants
+        * @param string  $size    One of the Proxy::SIZE_* constants
         * @param string  $updated Contact update date
         * @return string avatar link
         */
@@ -1764,7 +1764,7 @@ class Contact
         *
         * @param string  $url  contact url
         * @param integer $uid  user id
-        * @param string  $size One of the ProxyUtils::SIZE_* constants
+        * @param string  $size One of the Proxy::SIZE_* constants
         * @return string avatar link
         */
        public static function getAvatarUrlForUrl(string $url, int $uid, string $size = ''):string
@@ -1779,7 +1779,7 @@ class Contact
         * Get header link for given contact id
         *
         * @param integer $cid     contact id
-        * @param string  $size    One of the ProxyUtils::SIZE_* constants
+        * @param string  $size    One of the Proxy::SIZE_* constants
         * @param string  $updated Contact update date
         * @return string header link
         */
@@ -2218,11 +2218,7 @@ class Contact
                        self::updateAvatar($id, $ret['photo'], $update);
                }
 
-               if (empty($guid)) {
-                       $uriid = ItemURI::getIdByURI($ret['url']);
-               } else {
-                       $uriid = ItemURI::insert(['uri' => $ret['url'], 'guid' => $guid]);
-               }
+               $uriid = ItemURI::insert(['uri' => $ret['url'], 'guid' => $guid]);
 
                if (!$update) {
                        self::updateContact($id, $uid, $contact['url'], $ret['url'], ['failed' => false, 'last-update' => $updated, 'success_update' => $updated]);