提交
This commit is contained in:
@@ -251,6 +251,11 @@ export function mentionAcct(env: Env, actorId: string): string {
|
||||
return parseAcctFromActor(env, actorId);
|
||||
}
|
||||
|
||||
export async function isFollowedByAnyLocalUser(env: Env, actorId: string): Promise<boolean> {
|
||||
const row = await env.DB.prepare("SELECT 1 AS hit FROM outgoing_follows WHERE target_actor = ? AND accepted = 1 LIMIT 1").bind(actorId).first<{ hit: number }>();
|
||||
return Boolean(row);
|
||||
}
|
||||
|
||||
export async function decodeRemoteSignatureBase64(value: string): Promise<Uint8Array> {
|
||||
return base64Decode(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user