From e8e4f7ec8aa69d150b3fb142633608d277f40707 Mon Sep 17 00:00:00 2001 From: Purva92gupta Date: Wed, 27 Mar 2024 00:57:38 +0100 Subject: [PATCH] Update for TalkWidget.php to reflect the changes --- lib/Dashboard/TalkWidget.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Dashboard/TalkWidget.php b/lib/Dashboard/TalkWidget.php index ccf366e1ffc..c00a306eeaa 100644 --- a/lib/Dashboard/TalkWidget.php +++ b/lib/Dashboard/TalkWidget.php @@ -26,6 +26,7 @@ namespace OCA\Talk\Dashboard; use OCA\Talk\Chat\MessageParser; +use OCA\Talk\Chat\ChatManager; use OCA\Talk\Config; use OCA\Talk\Manager; use OCA\Talk\Model\BreakoutRoom; @@ -60,6 +61,7 @@ public function __construct( protected AvatarService $avatarService, protected ParticipantService $participantService, protected MessageParser $messageParser, + protected ChatManager $chatManager, protected ITimeFactory $timeFactory, ) { } @@ -201,7 +203,7 @@ protected function prepareRoom(Room $room, string $userId): WidgetItem { if ($room->getCallFlag() !== Participant::FLAG_DISCONNECTED) { $subtitle = $this->l10n->t('Call in progress'); } elseif ($participant->getAttendee()->getLastMentionMessage() > $participant->getAttendee()->getLastReadMessage()) { - $subtitle = $this->l10n->t('You were mentioned'); + $subtitle = $this->chatManager->getComment($room, (string)$participant->getAttendee()->getLastMentionMessage())->getMessage(); } return new WidgetItem(