Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3523129
D9972.id34054.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
910 B
Referenced Files
None
Subscribers
None
D9972.id34054.diff
View Options
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,16 @@
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,
+ });
+ }
}
export { deleteInviteLink };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 8:23 AM (14 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2699226
Default Alt Text
D9972.id34054.diff (910 B)
Attached To
Mode
D9972: [keyserver] Delete a holder after deleting a blob
Attached
Detach File
Event Timeline
Log In to Comment