We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 00cbc852 authored by mattl's avatar mattl

Make use of variable preMention signal method

parent 8dd06cd8
......@@ -847,9 +847,8 @@ function common_find_mentions($text, Profile $sender, Notice $parent=null)
'url' => $url);
preg_match_all('/'.Nickname::BEFORE_MENTIONS.'!(' . Nickname::DISPLAY_FMT . ')/',
$text, $hmatches, PREG_OFFSET_CAPTURE);
foreach ($hmatches[1] as $hmatch) {
$hmatches = common_find_mentions_raw($text, '!');
foreach ($hmatches as $hmatch) {
$nickname = Nickname::normalize($hmatch[0]);
$group = User_group::getForNickname($nickname, $sender);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment