Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3502655
D14176.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D14176.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 4:36 AM (13 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2681572
Default Alt Text
D14176.diff (1 KB)
Attached To
Mode
D14176: [keyserver] Avoid ignorePromiseRejections if isScriptViewer
Attached
Detach File
Event Timeline
Log In to Comment