From aafa1de4d56b0791c4d367aa530587082c833faf Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 17 Dec 2016 12:11:17 -0500 Subject: Handle username with dots in user mentions --- app/Job/UserMentionJob.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Job') diff --git a/app/Job/UserMentionJob.php b/app/Job/UserMentionJob.php index bbb27131..355095bb 100644 --- a/app/Job/UserMentionJob.php +++ b/app/Job/UserMentionJob.php @@ -58,7 +58,8 @@ class UserMentionJob extends BaseJob { $users = array(); - if (preg_match_all('/@([^\s,!.:?]+)/', $text, $matches)) { + if (preg_match_all('/@([^\s,!:?]+)/', $text, $matches)) { + array_walk($matches[1], function (&$username) { $username = rtrim($username, '.'); }); $users = $this->db->table(UserModel::TABLE) ->columns('id', 'username', 'name', 'email', 'language') ->eq('notifications_enabled', 1) -- cgit v1.2.3