mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-06-11 07:26:56 +00:00
16 lines
409 B
TypeScript
16 lines
409 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
interface UserLike {
|
|
readonly username: string;
|
|
readonly host: string | null;
|
|
}
|
|
|
|
/**
|
|
* Checks if the given user represents a system account, such as instance.actor.
|
|
*/
|
|
export function isSystemAccount(user: UserLike): boolean {
|
|
return user.host == null && user.username.includes('.');
|
|
}
|