Merge pull request #8790 from MrPetovan/bug/notices

Fix latest notice messages
This commit is contained in:
Tobias Diekershoff 2020-06-20 18:07:54 +02:00 committed by GitHub
commit 797eff853a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View file

@ -2087,10 +2087,9 @@ class OStatus
$mentioned = $newmentions;
foreach ($mentioned as $mention) {
$condition = ['uid' => $owner['uid'], 'nurl' => Strings::normaliseLink($mention)];
$contact = DBA::selectFirst('contact', ['forum', 'prv', 'self', 'contact-type'], $condition);
if ($contact["forum"] || $contact["prv"] || ($owner['contact-type'] == Contact::TYPE_COMMUNITY) ||
($contact['self'] && ($owner['account-type'] == User::ACCOUNT_TYPE_COMMUNITY))) {
$contact = Contact::getDetailsByURL($mention, $owner['uid']);
if (!empty($contact) && ($contact["forum"] || $contact["prv"] || ($owner['contact-type'] == Contact::TYPE_COMMUNITY) ||
($contact['self'] && ($owner['account-type'] == User::ACCOUNT_TYPE_COMMUNITY)))) {
XML::addElement($doc, $entry, "link", "",
[
"rel" => "mentioned",