From 32aa40257d6e7a0e9acee0b5b8493d6ffaf8634d Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Fri, 18 Aug 2023 20:04:39 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Signed-off-by: Richard Steinmetz --- lib/Dashboard/TalkWidget.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Dashboard/TalkWidget.php b/lib/Dashboard/TalkWidget.php index 0f6b9e27f02..42ca7ede294 100644 --- a/lib/Dashboard/TalkWidget.php +++ b/lib/Dashboard/TalkWidget.php @@ -38,7 +38,6 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\Comments\IComment; use OCP\Dashboard\IAPIWidget; -use OCP\Dashboard\IAPIWidgetV2; use OCP\Dashboard\IButtonWidget; use OCP\Dashboard\IConditionalWidget; use OCP\Dashboard\IIconWidget; @@ -54,7 +53,7 @@ use OCP\IUserSession; use OCP\Util; -class TalkWidget implements IAPIWidget, IAPIWidgetV2, IIconWidget, IButtonWidget, IOptionWidget, IConditionalWidget, IReloadableWidget { +class TalkWidget implements IAPIWidget, IIconWidget, IButtonWidget, IOptionWidget, IConditionalWidget, IReloadableWidget { public function __construct( protected IUserSession $userSession, @@ -66,7 +65,6 @@ public function __construct( protected ParticipantService $participantService, protected MessageParser $messageParser, protected ITimeFactory $timeFactory, - protected TalkSession $session, ) { } @@ -178,8 +176,7 @@ public function getItems(string $userId, ?string $since = null, int $limit = 7): * @inheritDoc */ public function getItemsV2(string $userId, ?string $since = null, int $limit = 7): WidgetItems { - $sessionIds = $this->session->getAllActiveSessions(); - $allRooms = $this->manager->getRoomsForUser($userId, $sessionIds, true); + $allRooms = $this->manager->getRoomsForUser($userId, [], true); $rooms = []; $mentions = [];