aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/note.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/note.php')
-rw-r--r--templates/note.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/templates/note.php b/templates/note.php
index d892656..e5c2942 100644
--- a/templates/note.php
+++ b/templates/note.php
@@ -1,4 +1,5 @@
<?php
+use Digitigrade\Model\Actor;
use Digitigrade\Model\InteractionKind;
use Digitigrade\Model\NotePrivacyScope;
use Digitigrade\Model\UserAccount;
@@ -47,12 +48,22 @@ if ($user != null) {
<?php if (isset($note->inReplyTo)): ?>
<div class="replyInfo">
+ <span class="material-symbols reply inlineIcon"></span>
<a href="/@/<?= $note->inReplyTo->author->getFullHandle() ?>/note/<?= $note->inReplyTo->id ?>">
- <span class="material-symbols reply inlineIcon"></span>
<?= sprintf(__('note.info.replyTo'),
'<b>' . htmlspecialchars($note->inReplyTo->author->displayName)) . '</b>' ?>
</a>
</div>
+ <?php elseif (count($note->mentions) > 0): ?>
+ <div class="replyInfo">
+ <span class="material-symbols alternate-email inlineIcon"></span>
+ <span>
+ <?= sprintf(__('note.info.mentions'), implode(', ', array_map(
+ fn(Actor $m) => '<b><a href="/@/' . $m->getFullHandle() . '">' . $m->displayName . '</a></b>',
+ $note->mentions
+ ))) ?>
+ </span>
+ </div>
<?php endif; ?>
<div class="content">