Page MenuHomePhabricator

D9972.id.diff
No OneTemporary

D9972.id.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,19 @@
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(
+ {
+ hash: `invite_${request.name}`,
+ holder: row.blobHolder,
+ },
+ true,
+ );
+ }
}
export { deleteInviteLink };

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 8:22 AM (14 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2699193
Default Alt Text
D9972.id.diff (944 B)

Event Timeline