summaryrefslogtreecommitdiffstats
path: root/apps/comments/lib/Activity/Provider.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments/lib/Activity/Provider.php')
-rw-r--r--apps/comments/lib/Activity/Provider.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php
index c21b7a9c4fd..4940bb6afec 100644
--- a/apps/comments/lib/Activity/Provider.php
+++ b/apps/comments/lib/Activity/Provider.php
@@ -213,8 +213,13 @@ class Provider implements IProvider {
continue;
}
+ $pattern = '/(^|\s)(' . '@' . $mention['id'] . ')(\b)/';
+ if (strpos($mention['id'], ' ') !== false) {
+ $pattern = '/(^|\s)(' . '@"' . $mention['id'] . '"' . ')(\b)?/';
+ }
+
$message = preg_replace(
- '/(^|\s)(' . '@' . $mention['id'] . ')(\b)/',
+ $pattern,
//'${1}' . $this->regexSafeUser($mention['id'], $displayName) . '${3}',
'${1}' . '{mention' . $mentionCount . '}' . '${3}',
$message