mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-09-18 21:38:07 +00:00
extra safety check in toggleSuspended
if the instance is `softwareSuspended` (i.e. it's running code that we don't want to federate with), manually toggling its suspension state makes little sense the actual control (`MkSwitch`) was already disabled in this case
This commit is contained in:
parent
0d55090f0b
commit
e0e9719555
1 changed files with 2 additions and 0 deletions
|
@ -325,6 +325,8 @@ async function toggleMediaSilenced(): Promise<void> {
|
|||
async function toggleSuspended(): Promise<void> {
|
||||
if (!iAmModerator) return;
|
||||
if (!instance.value) throw new Error('No instance?');
|
||||
if (suspensionState.value === 'softwareSuspended') return;
|
||||
|
||||
suspensionState.value = isSuspended.value ? 'manuallySuspended' : 'none';
|
||||
await misskeyApi('admin/federation/update-instance', {
|
||||
host: instance.value.host,
|
||||
|
|
Loading…
Add table
Reference in a new issue