]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
We didn't get profiles from the new-style attention system
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 13 Jan 2016 17:35:25 +0000 (18:35 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 13 Jan 2016 17:35:25 +0000 (18:35 +0100)
lib/util.php

index aacdb3ec93b539948124980429d05983dedf0e41..81270baef35b1f38c436404d3b2b6a50dc636cc1 100644 (file)
@@ -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;
             }
         }