]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact.php
Remove spaces
[friendica.git] / src / Model / Contact.php
index 9e870d505486c0d3266aa3113467e43daf32bf72..53f696444d31bd3724cdc6e51dc3cb7cd1c4e086 100644 (file)
@@ -676,7 +676,7 @@ class Contact
        public static function updateSelfFromUserID($uid, $update_avatar = false)
        {
                $fields = ['id', 'name', 'nick', 'location', 'about', 'keywords', 'avatar', 'prvkey', 'pubkey',
-                       'xmpp', 'contact-type', 'forum', 'prv', 'avatar-date', 'url', 'nurl', 'unsearchable',
+                       'xmpp', 'matrix', 'contact-type', 'forum', 'prv', 'avatar-date', 'url', 'nurl', 'unsearchable',
                        'photo', 'thumb', 'micro', 'addr', 'request', 'notify', 'poll', 'confirm', 'poco', 'network'];
                $self = DBA::selectFirst('contact', $fields, ['uid' => $uid, 'self' => true]);
                if (!DBA::isResult($self)) {
@@ -690,7 +690,7 @@ class Contact
                }
 
                $fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region',
-                       'country-name', 'pub_keywords', 'xmpp', 'net-publish'];
+                       'country-name', 'pub_keywords', 'xmpp', 'matrix', 'net-publish'];
                $profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
                if (!DBA::isResult($profile)) {
                        return false;
@@ -702,7 +702,7 @@ class Contact
                        'avatar-date' => $self['avatar-date'], 'location' => Profile::formatLocation($profile),
                        'about' => $profile['about'], 'keywords' => $profile['pub_keywords'],
                        'contact-type' => $user['account-type'], 'prvkey' => $user['prvkey'],
-                       'pubkey' => $user['pubkey'], 'xmpp' => $profile['xmpp'], 'network' => Protocol::DFRN];
+                       'pubkey' => $user['pubkey'], 'xmpp' => $profile['xmpp'], 'matrix' => $profile['matrix'], 'network' => Protocol::DFRN];
 
                // it seems as if ported accounts can have wrong values, so we make sure that now everything is fine.
                $fields['url'] = DI::baseUrl() . '/profile/' . $user['nickname'];
@@ -2064,11 +2064,11 @@ class Contact
                 */
 
                // These fields aren't updated by this routine:
-               // 'xmpp', 'sensitive'
+               // 'sensitive'
 
                $fields = ['uid', 'uri-id', 'avatar', 'header', 'name', 'nick', 'location', 'keywords', 'about', 'subscribe',
                        'manually-approve', 'unsearchable', 'url', 'addr', 'batch', 'notify', 'poll', 'request', 'confirm', 'poco',
-                       'network', 'alias', 'baseurl', 'gsid', 'forum', 'prv', 'contact-type', 'pubkey', 'last-item'];
+                       'network', 'alias', 'baseurl', 'gsid', 'forum', 'prv', 'contact-type', 'pubkey', 'last-item', 'xmpp', 'matrix'];
                $contact = DBA::selectFirst('contact', $fields, ['id' => $id]);
                if (!DBA::isResult($contact)) {
                        return false;
@@ -2319,7 +2319,7 @@ class Contact
         * @throws HTTPException\NotFoundException
         * @throws \ImagickException
         */
-       public static function createFromProbe(int $uid, $url, $network = '')
+       public static function createFromProbeForUser(int $uid, $url, $network = '')
        {
                $result = ['cid' => -1, 'success' => false, 'message' => ''];
 
@@ -2580,7 +2580,7 @@ class Contact
        {
                $contact = self::getById($cid, ['url']);
 
-               $result = self::createFromProbe($uid, $contact['url']);
+               $result = self::createFromProbeForUser($uid, $contact['url']);
 
                return $result['cid'];
        }
@@ -2738,7 +2738,7 @@ class Contact
                                }
                        } elseif (DBA::isResult($user) && in_array($user['page-flags'], [User::PAGE_FLAGS_SOAPBOX, User::PAGE_FLAGS_FREELOVE, User::PAGE_FLAGS_COMMUNITY])) {
                                if (($user['page-flags'] == User::PAGE_FLAGS_FREELOVE) && ($network != Protocol::DIASPORA)) {
-                                       self::createFromProbe($importer['uid'], $url, $network);
+                                       self::createFromProbeForUser($importer['uid'], $url, $network);
                                }
 
                                $condition = ['uid' => $importer['uid'], 'url' => $url, 'pending' => true];