| 1 | import type { Attribution } from "@refs/backend/contract"; |
| 2 | |
| 3 | /** Who did something, as a timeline shows it: the actor, and the human an agent acted for. */ |
| 4 | export function actorName(by: Attribution): string { |
| 5 | return by.onBehalfOf ? `${by.actor.name} for ${by.onBehalfOf.name}` : by.actor.name; |
| 6 | } |