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.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php
index 527c9c4ca69..fca3b9e75d5 100644
--- a/apps/comments/lib/Activity/Provider.php
+++ b/apps/comments/lib/Activity/Provider.php
@@ -213,17 +213,11 @@ class Provider implements IProvider {
continue;
}
- $pattern = '/(^|\s)(' . '@' . $mention['id'] . ')(\b)/';
- if (strpos($mention['id'], ' ') !== false) {
- $pattern = '/(^|\s)(' . '@"' . $mention['id'] . '"' . ')(\b)?/';
+ $message = str_replace('@"' . $mention['id'] . '"', '{mention' . $mentionCount . '}', $message);
+ if (strpos($mention['id'], ' ') === false && strpos($mention['id'], 'guest/') !== 0) {
+ $message = str_replace('@' . $mention['id'], '{mention' . $mentionCount . '}', $message);
}
- $message = preg_replace(
- $pattern,
- //'${1}' . $this->regexSafeUser($mention['id'], $displayName) . '${3}',
- '${1}' . '{mention' . $mentionCount . '}' . '${3}',
- $message
- );
$mentions['mention' . $mentionCount] = $this->generateUserParameter($mention['id']);
$mentionCount++;
}