Page MenuHomePhabricator

D14176.diff
No OneTemporary

D14176.diff

diff --git a/keyserver/src/deleters/account-deleters.js b/keyserver/src/deleters/account-deleters.js
--- a/keyserver/src/deleters/account-deleters.js
+++ b/keyserver/src/deleters/account-deleters.js
@@ -62,7 +62,11 @@
(user: UserInfo): boolean => user.id !== deletedUserID,
);
- ignorePromiseRejections(deleteUploadsForUser(deletedUserID));
+ if (viewer.isScriptViewer) {
+ await deleteUploadsForUser(deletedUserID);
+ } else {
+ ignorePromiseRejections(deleteUploadsForUser(deletedUserID));
+ }
// TODO: if this results in any orphaned orgs, convert them to chats
const deletionQuery = SQL`
@@ -124,14 +128,17 @@
};
const message = JSON.stringify(reservedUsernameMessage);
- ignorePromiseRejections(
- (async () => {
- const rustAPI = await getRustAPI();
- const accountInfo = await fetchOlmAccount('content');
- const signature = accountInfo.account.sign(message);
- await rustAPI.removeReservedUsername(message, signature);
- })(),
- );
+ const removeReservedUsernamePromise = (async () => {
+ const rustAPI = await getRustAPI();
+ const accountInfo = await fetchOlmAccount('content');
+ const signature = accountInfo.account.sign(message);
+ await rustAPI.removeReservedUsername(message, signature);
+ })();
+ if (viewer.isScriptViewer) {
+ await removeReservedUsernamePromise;
+ } else {
+ ignorePromiseRejections(removeReservedUsernamePromise);
+ }
}
if (anonymousViewerData) {

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 11:34 AM (6 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2681572
Default Alt Text
D14176.diff (1 KB)

Event Timeline