@streamoid/settings 0.6.3 → 0.6.4

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/README.md CHANGED
@@ -171,3 +171,7 @@ responses cannot update the next workspace. Organization roles come from the
171
171
  organization API, never the workspace role. Guests may see an authorized owner
172
172
  name, but only members/admins get the optional navigation callback. The host
173
173
  owns routing; apps without organization settings omit the callback.
174
+
175
+ The adapter prefers `organizationName` from the authorized workspace response.
176
+ This lets invited workspace members see its owner without organization membership;
177
+ the separately checked organization role still controls settings navigation.
package/dist/index.js CHANGED
@@ -12357,8 +12357,9 @@ async function loadWorkspaceOrganization(workspaceId, request, signal) {
12357
12357
  const id = typeof ownerRef === "string" ? ownerRef : ownerRef?._id ?? owner?._id;
12358
12358
  if (!id) return null;
12359
12359
  const path = `/organization/${encodeURIComponent(id)}`;
12360
+ const displayName = workspace.organizationName ?? row.organizationName;
12360
12361
  const [detail, role] = await Promise.allSettled([
12361
- owner?.name && owner._id === id ? Promise.resolve(owner) : request(path, signal).then(dataOf),
12362
+ typeof displayName === "string" && displayName.trim() ? Promise.resolve({ _id: id, name: displayName }) : owner?.name && owner._id === id ? Promise.resolve(owner) : request(path, signal).then(dataOf),
12362
12363
  request(`${path}/role`, signal).then(dataOf)
12363
12364
  ]);
12364
12365
  if (signal.aborted) throw new Error("Request aborted");
package/dist/index.mjs CHANGED
@@ -12364,8 +12364,9 @@ async function loadWorkspaceOrganization(workspaceId, request, signal) {
12364
12364
  const id = typeof ownerRef === "string" ? ownerRef : ownerRef?._id ?? owner?._id;
12365
12365
  if (!id) return null;
12366
12366
  const path = `/organization/${encodeURIComponent(id)}`;
12367
+ const displayName = workspace.organizationName ?? row.organizationName;
12367
12368
  const [detail, role] = await Promise.allSettled([
12368
- owner?.name && owner._id === id ? Promise.resolve(owner) : request(path, signal).then(dataOf),
12369
+ typeof displayName === "string" && displayName.trim() ? Promise.resolve({ _id: id, name: displayName }) : owner?.name && owner._id === id ? Promise.resolve(owner) : request(path, signal).then(dataOf),
12369
12370
  request(`${path}/role`, signal).then(dataOf)
12370
12371
  ]);
12371
12372
  if (signal.aborted) throw new Error("Request aborted");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoid/settings",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",