Skip to content
refs
History
6 lines · 297 BRaw
1import 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. */
4export function actorName(by: Attribution): string {
5 return by.onBehalfOf ? `${by.actor.name} for ${by.onBehalfOf.name}` : by.actor.name;
6}