NullcatChan/utils/acct.ts
2022-09-18 00:16:06 +09:00

6 lines
164 B
TypeScript

export function acct(user: { username: string; host?: string | null; }): string {
return user.host
? `@${user.username}@${user.host}`
: `@${user.username}`;
}