Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(notifications): fix reconcile in notification source (#801)
teo10924b1d7a41
diff --git a/js/app/packages/notifications/notification-source.ts b/js/app/packages/notifications/notification-source.tsindex d0de1d7a14..65cc89a2ce 100644--- a/js/app/packages/notifications/notification-source.ts+++ b/js/app/packages/notifications/notification-source.ts@@ -116,6 +116,18 @@ export function createNotificationSource(}batch(() => {+ const currentKeys: Set<CompositeEntity> = new Set(+ Object.keys(store) as CompositeEntity[]+ );+ const newKeys: Set<CompositeEntity> = new Set(+ Object.keys(newNotificationMap) as CompositeEntity[]+ );+ for (const key of currentKeys) {+ if (!newKeys.has(key)) {+ setStore(key, reconcile([], { key: NOTIFICATION_KEY }));+ }+ }+for (const [composite, notifications] of Object.entries(newNotificationMap)) {