Merge pull request #13371 from MrPetovan/bug/13370-empty-gsid

Skip server ignored check when contact gsid is empty in Module\Contact\Profile
This commit is contained in:
Michael Vogel 2023-08-22 22:13:49 +02:00 committed by GitHub
commit 9a50101bbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,7 +267,13 @@ class Profile extends BaseModule
$insecure = $this->t('Private communications are not available for this contact.'); $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 = $serverIgnored =
$contact['gsid'] &&
$this->userGServer->isIgnoredByUser($this->session->getLocalUserId(), $contact['gsid']) ? $this->userGServer->isIgnoredByUser($this->session->getLocalUserId(), $contact['gsid']) ?
$this->t('This contact is on a server you ignored.') $this->t('This contact is on a server you ignored.')
: ''; : '';