aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments/lib/Notification/Notifier.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments/lib/Notification/Notifier.php')
-rw-r--r--apps/comments/lib/Notification/Notifier.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/comments/lib/Notification/Notifier.php b/apps/comments/lib/Notification/Notifier.php
index 9f69e5599f8..20e0667d143 100644
--- a/apps/comments/lib/Notification/Notifier.php
+++ b/apps/comments/lib/Notification/Notifier.php
@@ -195,7 +195,11 @@ class Notifier implements INotifier {
// could contain characters like '@' for user IDs) but a one-based
// index of the mentions of that type.
$mentionParameterId = 'mention-' . $mention['type'] . $mentionTypeCount[$mention['type']];
- $message = str_replace('@' . $mention['id'], '{' . $mentionParameterId . '}', $message);
+ $message = str_replace('@"' . $mention['id'] . '"', '{' . $mentionParameterId . '}', $message);
+ if (strpos($mention['id'], ' ') === false && strpos($mention['id'], 'guest/') !== 0) {
+ $message = str_replace('@' . $mention['id'], '{' . $mentionParameterId . '}', $message);
+ }
+
try {
$displayName = $this->commentsManager->resolveDisplayName($mention['type'], $mention['id']);
} catch (\OutOfBoundsException $e) {