Skip to content

Commit

Permalink
fix(comment): Strip email prefix as well
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Oct 17, 2024
1 parent 50ae330 commit 52eccbc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/private/Comments/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 52eccbc

Please sign in to comment.