mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
fix: call remove if it's available
This commit is contained in:
parent
4b321f21fc
commit
40824280b4
1 changed files with 7 additions and 5 deletions
|
|
@ -160,11 +160,13 @@ const adminActionController: AppController = async (c) => {
|
|||
}
|
||||
if (data.type === 'revoke_name') {
|
||||
n.revoke_name = true;
|
||||
relay.remove!([{ kinds: [30360], authors: [await conf.signer.getPublicKey()], '#p': [authorId] }]).catch(
|
||||
(e: unknown) => {
|
||||
logi({ level: 'error', ns: 'ditto.api.admin.account.action', type: data.type, error: errorJson(e) });
|
||||
},
|
||||
);
|
||||
if (relay.remove) {
|
||||
relay.remove([{ kinds: [30360], authors: [await conf.signer.getPublicKey()], '#p': [authorId] }]).catch(
|
||||
(e: unknown) => {
|
||||
logi({ level: 'error', ns: 'ditto.api.admin.account.action', type: data.type, error: errorJson(e) });
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
await updateUser(authorId, n, c);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue