From 3b58d234d7a326fbc02286b321d6d4f51068f3f4 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Tue, 16 Apr 2024 14:07:21 -0300 Subject: [PATCH] fix: supported versions not being updated (#32220) --- .changeset/sharp-yaks-turn.md | 5 +++++ .../meteor/app/cloud/server/functions/syncWorkspace/index.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/sharp-yaks-turn.md diff --git a/.changeset/sharp-yaks-turn.md b/.changeset/sharp-yaks-turn.md new file mode 100644 index 000000000000..7c05bf5a3b0e --- /dev/null +++ b/.changeset/sharp-yaks-turn.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed supported versions not being updated in airgapped environments diff --git a/apps/meteor/app/cloud/server/functions/syncWorkspace/index.ts b/apps/meteor/app/cloud/server/functions/syncWorkspace/index.ts index 4c1d78440648..1fd121cb710c 100644 --- a/apps/meteor/app/cloud/server/functions/syncWorkspace/index.ts +++ b/apps/meteor/app/cloud/server/functions/syncWorkspace/index.ts @@ -13,9 +13,9 @@ import { syncCloudData } from './syncCloudData'; */ export async function syncWorkspace() { try { + await getCachedSupportedVersionsToken.reset(); await announcementSync(); await syncCloudData(); - await getCachedSupportedVersionsToken.reset(); } catch (err) { switch (true) { case err instanceof CloudWorkspaceRegistrationError: @@ -33,8 +33,8 @@ export async function syncWorkspace() { function: 'syncCloudData', }); try { - await legacySyncWorkspace(); await getCachedSupportedVersionsToken.reset(); + await legacySyncWorkspace(); } catch (err) { switch (true) { case err instanceof CloudWorkspaceRegistrationError: