@codemem/server 0.49.0-beta.3 → 0.49.0-beta.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/dist/index.js CHANGED
@@ -1034,7 +1034,8 @@ async function finishAccountStatus(options, context, fresh, remote, read) {
1034
1034
  await attachDeviceConnection(options, context, currentView, signal);
1035
1035
  await attachManagementActions(options, context, currentView, signal);
1036
1036
  if (remote.kind === "status") try {
1037
- if (readOwnerAssociation(context, remote.status.coordinatorId)) return attachOperation(ownerUnavailable(accountLocalView(fresh), "context_changed"), options.registry);
1037
+ const association = readOwnerAssociation(context, remote.status.coordinatorId);
1038
+ if (association && association.ownerIdentityId !== context.identityId) return attachOperation(ownerUnavailable(accountLocalView(fresh), "context_changed"), options.registry);
1038
1039
  } catch {
1039
1040
  return attachOperation(ownerUnavailable(accountLocalView(fresh), "account_owner_association_invalid"), options.registry);
1040
1041
  }
@@ -1050,6 +1051,7 @@ async function readAssociatedOwner(options, context, view, actorRemote, signal)
1050
1051
  try {
1051
1052
  const association = readOwnerAssociation(context, actorRemote.status.coordinatorId);
1052
1053
  if (!association) return null;
1054
+ if (association.ownerIdentityId === context.identityId) return null;
1053
1055
  const before = options.readContext(context.groupId);
1054
1056
  if ("error" in before || !before.context || !sameAuthority(context, before.context)) return ownerUnavailable(local, "context_changed");
1055
1057
  const { dbPath, keysDir, groupId, coordinatorUrl } = context;