Skip to content

Commit

Permalink
Update for TalkWidget.php to reflect the changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Purva92Gupta committed Mar 26, 2024
1 parent c694d41 commit e8e4f7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Dashboard/TalkWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -60,6 +61,7 @@ public function __construct(
protected AvatarService $avatarService,
protected ParticipantService $participantService,
protected MessageParser $messageParser,
protected ChatManager $chatManager,
protected ITimeFactory $timeFactory,
) {
}
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit e8e4f7e

Please sign in to comment.