Page MenuHomePhabricator

D9972.id33597.diff
No OneTemporary

D9972.id33597.diff

diff --git a/keyserver/src/deleters/link-deleters.js b/keyserver/src/deleters/link-deleters.js
--- a/keyserver/src/deleters/link-deleters.js
+++ b/keyserver/src/deleters/link-deleters.js
@@ -6,6 +6,7 @@
import { dbQuery, SQL } from '../database/database.js';
import { checkThreadPermission } from '../fetchers/thread-permission-fetchers.js';
+import { deleteBlob } from '../services/blob.js';
import { Viewer } from '../session/viewer.js';
async function deleteInviteLink(
@@ -24,9 +25,13 @@
const query = SQL`
DELETE FROM invite_links
WHERE name = ${request.name} AND community = ${request.communityID}
+ RETURNING blob_holder AS blobHolder
`;
- await dbQuery(query);
+ const [[row]] = await dbQuery(query);
+ if (row?.blobHolder) {
+ await deleteBlob(`invite_${request.name}`, row.blobHolder);
+ }
}
export { deleteInviteLink };

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 8:23 AM (14 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2699225
Default Alt Text
D9972.id33597.diff (872 B)

Event Timeline