aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Comments/Comment.php
diff options
context:
space:
mode:
authorMario Danic <mario@lovelyhq.com>2018-06-08 00:35:51 +0200
committerMario Danic <mario@lovelyhq.com>2018-06-08 00:35:51 +0200
commit6bf8fca574897890013ba14e5ac00bc6b9a6c9e3 (patch)
tree737089139f7fea59f3a8f93e066666b108d34ebb /lib/private/Comments/Comment.php
parentbe30c09e9e184f07a9ed58c893ae80c65cc89839 (diff)
downloadnextcloud-server-6bf8fca574897890013ba14e5ac00bc6b9a6c9e3.tar.gz
nextcloud-server-6bf8fca574897890013ba14e5ac00bc6b9a6c9e3.zip
Fix mentions regex
Signed-off-by: Mario Danic <mario@lovelyhq.com>
Diffstat (limited to 'lib/private/Comments/Comment.php')
-rw-r--r--lib/private/Comments/Comment.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php
index dd790c2e50a..9335b911b8f 100644
--- a/lib/private/Comments/Comment.php
+++ b/lib/private/Comments/Comment.php
@@ -225,7 +225,7 @@ class Comment implements IComment {
*
*/
public function getMentions() {
- $ok = preg_match_all('/\B@[a-z0-9_\-@\.\']+/i', $this->getMessage(), $mentions);
+ $ok = preg_match_all('/\B(^@\w+|(?<=\s)@\w+)/gi', $this->getMessage(), $mentions);
if(!$ok || !isset($mentions[0]) || !is_array($mentions[0])) {
return [];
}