forked from GNUsocial/gnu-social
Make use of variable preMention signal method
This commit is contained in:
parent
8dd06cd8d8
commit
00cbc852b0
@ -847,9 +847,8 @@ function common_find_mentions($text, Profile $sender, Notice $parent=null)
|
|||||||
'url' => $url);
|
'url' => $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
preg_match_all('/'.Nickname::BEFORE_MENTIONS.'!(' . Nickname::DISPLAY_FMT . ')/',
|
$hmatches = common_find_mentions_raw($text, '!');
|
||||||
$text, $hmatches, PREG_OFFSET_CAPTURE);
|
foreach ($hmatches as $hmatch) {
|
||||||
foreach ($hmatches[1] as $hmatch) {
|
|
||||||
$nickname = Nickname::normalize($hmatch[0]);
|
$nickname = Nickname::normalize($hmatch[0]);
|
||||||
$group = User_group::getForNickname($nickname, $sender);
|
$group = User_group::getForNickname($nickname, $sender);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user