We didn't get profiles from the new-style attention system

This commit is contained in:
Mikael Nordfeldth 2016-01-13 18:35:25 +01:00
parent 961725205d
commit 818aaa0578

View File

@ -727,15 +727,11 @@ function common_find_mentions($text, Profile $sender, Notice $parent=null)
// Does it have a parent notice for context? // Does it have a parent notice for context?
if ($parent instanceof Notice) { if ($parent instanceof Notice) {
$ids = $parent->getReplies(); // replied-to _profile ids_ foreach ($parent->getAttentionProfiles() as $repliedTo) {
if (!$repliedTo->isPerson()) {
foreach ($ids as $id) { continue;
try {
$repliedTo = Profile::getByID($id);
$origMentions[$repliedTo->getNickname()] = $repliedTo;
} catch (NoResultException $e) {
// continue foreach
} }
$origMentions[$repliedTo->getNickname()] = $repliedTo;
} }
} }