From: Mikael Nordfeldth Date: Wed, 13 Jan 2016 17:35:25 +0000 (+0100) Subject: We didn't get profiles from the new-style attention system X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=818aaa057892483a1eb8cebda0401f57c40f1e5a;p=quix0rs-gnu-social.git We didn't get profiles from the new-style attention system --- diff --git a/lib/util.php b/lib/util.php index aacdb3ec93..81270baef3 100644 --- a/lib/util.php +++ b/lib/util.php @@ -727,15 +727,11 @@ function common_find_mentions($text, Profile $sender, Notice $parent=null) // Does it have a parent notice for context? if ($parent instanceof Notice) { - $ids = $parent->getReplies(); // replied-to _profile ids_ - - foreach ($ids as $id) { - try { - $repliedTo = Profile::getByID($id); - $origMentions[$repliedTo->getNickname()] = $repliedTo; - } catch (NoResultException $e) { - // continue foreach + foreach ($parent->getAttentionProfiles() as $repliedTo) { + if (!$repliedTo->isPerson()) { + continue; } + $origMentions[$repliedTo->getNickname()] = $repliedTo; } }