diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php index 136504de3066c..597d83ec72401 100644 --- a/lib/private/Comments/Comment.php +++ b/lib/private/Comments/Comment.php @@ -209,6 +209,8 @@ public function getMentions(): array { if (str_starts_with($cleanId, 'guest/')) { $result[] = ['type' => 'guest', 'id' => $cleanId]; } elseif (str_starts_with($cleanId, 'email/')) { + /** @var non-empty-lowercase-string $cleanId */ + $cleanId = substr($cleanId, 6); $result[] = ['type' => 'email', 'id' => $cleanId]; } elseif (str_starts_with($cleanId, 'federated_group/')) { /** @var non-empty-lowercase-string $cleanId */