]> git.mxchange.org Git - friendica.git/commitdiff
Skip server ignored check when contact gsid is empty in Module\Contact\Profile
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 22 Aug 2023 12:38:12 +0000 (08:38 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 22 Aug 2023 12:38:12 +0000 (08:38 -0400)
src/Module/Contact/Profile.php

index 399198062baded45d55297b26851cbb87d01812d..d6f5a90ce8810a1dfb94a2f28e703ead81e76fcd 100644 (file)
@@ -267,7 +267,13 @@ class Profile extends BaseModule
 
                $insecure = $this->t('Private communications are not available for this contact.');
 
+               // @TODO: Figure out why gsid can be empty
+               if (empty($contact['gsid'])) {
+                       $this->logger->notice('Empty gsid for contact', ['contact' => $contact]);
+               }
+
                $serverIgnored =
+                       $contact['gsid'] &&
                        $this->userGServer->isIgnoredByUser($this->session->getLocalUserId(), $contact['gsid']) ?
                                $this->t('This contact is on a server you ignored.')
                                : '';