mirror of
https://github.com/aljazceru/ditto.git
synced 2026-02-10 16:04:20 +01:00
Use past-tense for some n-tag values
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user