From 3d3efcc9d5da9264ff3b89bd196ef62919cd5831 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Tue, 1 Oct 2024 11:39:17 +0530 Subject: [PATCH] fix: cross org progress. cc @TorstenDittmann ^_^ --- src/lib/components/backupRestoreBox.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/components/backupRestoreBox.svelte b/src/lib/components/backupRestoreBox.svelte index 85046e4a7..783bad702 100644 --- a/src/lib/components/backupRestoreBox.svelte +++ b/src/lib/components/backupRestoreBox.svelte @@ -10,6 +10,7 @@ import { page } from '$app/stores'; import { addNotification } from '$lib/stores/notifications'; import { base } from '$app/paths'; + import { getProjectId } from '$lib/helpers/project'; let backupRestoreItems: { archives: Map; @@ -93,7 +94,7 @@ if ($collection === 'restorations') { const { newId, newName } = - collectionMap.get($id).options?.['databases']?.['database'][0] || {}; + collectionMap.get($id).options?.['databases']?.['database'][0] || {}; showRestoreNotification(newId, newName); } @@ -149,6 +150,9 @@ if (isSelfHosted || (isCloud && $organization.billingPlan === BillingPlan.FREE)) return; sdk.forConsole.client.subscribe('console', (response) => { + // nice! + if (!response.channels.includes(`projects.${getProjectId()}`)) return; + if ( response.events.includes('archives.*') || response.events.includes('restorations.*')