Use past-tense for some n-tag values

This commit is contained in:
Alex Gleason 2024-06-09 11:26:57 -05:00
parent 8802cbd779
commit 594f37ea33
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
3 changed files with 6 additions and 6 deletions

View File

@ -107,13 +107,13 @@ const adminActionController: AppController = async (c) => {
n.sensitive = true;
}
if (data.type === 'disable') {
n.disable = true;
n.disabled = true;
}
if (data.type === 'silence') {
n.silence = true;
n.silenced = true;
}
if (data.type === 'suspend') {
n.suspend = true;
n.suspended = true;
}
await updateUser(authorId, n, c);

View File

@ -45,10 +45,10 @@ async function handleEvent(event: DittoEvent, signal: AbortSignal): Promise<void
const n = getTagSet(event.user?.tags ?? [], 'n');
if (n.has('disable')) {
if (n.has('disabled')) {
throw new RelayError('blocked', 'user is disabled');
}
if (n.has('suspend')) {
if (n.has('suspended')) {
throw new RelayError('blocked', 'user is suspended');
}

View File

@ -30,7 +30,7 @@ export class AdminStore implements NStore {
const n = getTagSet(user?.tags ?? [], 'n');
if (n.has('disable') || n.has('suspend')) {
if (n.has('disabled') || n.has('suspended')) {
return false;
}