@kumori/aurora-backend-handler 1.1.22 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/websocket-manager.ts +4 -5
package/package.json
CHANGED
package/websocket-manager.ts
CHANGED
|
@@ -599,7 +599,7 @@ const rebuildHierarchy = () => {
|
|
|
599
599
|
notificationsEnabled: preservedUserData.notificationsEnabled,
|
|
600
600
|
organizations: Array.from(organizationsMap.values()),
|
|
601
601
|
clusterTokens: Array.from(clusterTokensMap.values()),
|
|
602
|
-
tokens: preservedUserData.tokens || [],
|
|
602
|
+
tokens: tokenMap.size > 0 ? (preservedUserData.tokens || []).filter(t => tokenMap.has(t.name)) : (preservedUserData.tokens || []),
|
|
603
603
|
tenants: Array.from(tenantsMap.values()),
|
|
604
604
|
axebowPlan: preservedUserData.axebowPlan,
|
|
605
605
|
companyName: preservedUserData.companyName,
|
|
@@ -1966,10 +1966,9 @@ export const updateUserComplete = (updatedUserData: UserData): User => {
|
|
|
1966
1966
|
const localOnlyTokens = (userData.tokens || []).filter(
|
|
1967
1967
|
(t) => !incomingTokenNames.has(t.name)
|
|
1968
1968
|
);
|
|
1969
|
-
const mergedTokens = [
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
];
|
|
1969
|
+
const mergedTokens = [...(updatedUserData.tokens || []), ...localOnlyTokens]
|
|
1970
|
+
.filter((t, index, arr) => arr.findIndex(x => x.name === t.name) === index)
|
|
1971
|
+
.filter(t => tokenMap.size === 0 || tokenMap.has(t.name));
|
|
1973
1972
|
|
|
1974
1973
|
userData = {
|
|
1975
1974
|
id: updatedUserData.id || userData.id,
|