mirror of
https://github.com/friendica/friendica
synced 2024-11-18 23:03:40 +00:00
Use Contact::getDetailsByURL instead of custom query in Protocol\OStatus
- Address part of https://github.com/friendica/friendica/issues/8475#issuecomment-646457104
This commit is contained in:
parent
aafef02789
commit
a83681e93a
1 changed files with 3 additions and 4 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue