From bc89e8f26b1482567bbab28f1923aea0c4faa197 Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Tue, 31 Mar 2026 18:36:24 -0300 Subject: [PATCH 1/2] fix(outlook): Rely on server setting check for display Outlook Calendar action item --- .../hooks/roomActions/useOutlookCalenderRoomAction.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/meteor/client/hooks/roomActions/useOutlookCalenderRoomAction.ts b/apps/meteor/client/hooks/roomActions/useOutlookCalenderRoomAction.ts index 52e3e31dcf59a..a88ff5854fac4 100644 --- a/apps/meteor/client/hooks/roomActions/useOutlookCalenderRoomAction.ts +++ b/apps/meteor/client/hooks/roomActions/useOutlookCalenderRoomAction.ts @@ -1,14 +1,14 @@ -import { useUser } from '@rocket.chat/ui-contexts'; +import { useSetting } from '@rocket.chat/ui-contexts'; import type { RoomToolboxActionConfig } from '@rocket.chat/ui-contexts'; import { lazy, useMemo } from 'react'; const OutlookEventsRoute = lazy(() => import('../../views/outlookCalendar/OutlookEventsRoute')); export const useOutlookCalenderRoomAction = () => { - const user = useUser(); + const enabled = useSetting('Outlook_Calendar_Enabled', false); return useMemo((): RoomToolboxActionConfig | undefined => { - if (!user?.settings?.calendar?.outlook?.Enabled) { + if (!enabled) { return undefined; } @@ -20,5 +20,5 @@ export const useOutlookCalenderRoomAction = () => { tabComponent: OutlookEventsRoute, order: 999, }; - }, [user?.settings?.calendar?.outlook?.Enabled]); + }, [enabled]); }; From 31d5ab696c1887627bf058769e7c32339b7d2e38 Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Wed, 1 Apr 2026 15:22:02 -0300 Subject: [PATCH 2/2] chore: changeset --- .changeset/nasty-tomatoes-bake.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/nasty-tomatoes-bake.md diff --git a/.changeset/nasty-tomatoes-bake.md b/.changeset/nasty-tomatoes-bake.md new file mode 100644 index 0000000000000..4320e54fe45e5 --- /dev/null +++ b/.changeset/nasty-tomatoes-bake.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes an issue where the outlook calendar action isn't being reactive based on the setting