This commit is contained in:
Frank
2025-10-06 16:15:10 -04:00
parent 1b17d8070b
commit 9e8fd16e6e
13 changed files with 437 additions and 62 deletions

View File

@@ -20,6 +20,7 @@ export namespace Actor {
properties: {
userID: string
workspaceID: string
accountID: string
}
}
@@ -71,4 +72,12 @@ export namespace Actor {
}
throw new Error(`actor of type "${actor.type}" is not associated with a workspace`)
}
export function account() {
const actor = use()
if ("accountID" in actor.properties) {
return actor.properties.accountID
}
throw new Error(`actor of type "${actor.type}" is not associated with an account`)
}
}