Commit 6b9a8b7b authored by mmn's avatar mmn

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

parent e728e2aa
......@@ -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();
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment