Reuse code from our classes, don't write own algorithms

This commit is contained in:
Mikael Nordfeldth 2015-06-02 13:45:22 +02:00
parent e728e2aa81
commit 6b9a8b7b19
1 changed files with 2 additions and 5 deletions

View File

@ -697,11 +697,8 @@ function common_linkify_mention(array $mention)
*/
function common_find_mentions($text, Notice $notice)
{
try {
$sender = Profile::getKV('id', $notice->profile_id);
} catch (NoProfileException $e) {
return array();
}
// The getProfile call throws NoProfileException on failure
$sender = $notice->getProfile();
$mentions = array();