Page MenuHomePhabricator

D7375.diff
No OneTemporary

D7375.diff

diff --git a/keyserver/src/updaters/upload-updaters.js b/keyserver/src/updaters/upload-updaters.js
--- a/keyserver/src/updaters/upload-updaters.js
+++ b/keyserver/src/updaters/upload-updaters.js
@@ -38,4 +38,22 @@
await dbQuery(query);
}
-export { assignImages, assignMessageContainerToMedia };
+async function assignUserContainerToMedia(
+ viewer: Viewer,
+ mediaID: string,
+): Promise<void> {
+ const query = SQL`
+ UPDATE uploads
+ SET container = ${viewer.id}
+ WHERE id = ${mediaID}
+ AND uploader = ${viewer.id}
+ AND container IS NULL
+ `;
+ await dbQuery(query);
+}
+
+export {
+ assignImages,
+ assignMessageContainerToMedia,
+ assignUserContainerToMedia,
+};

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 3:45 AM (22 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2595639
Default Alt Text
D7375.diff (705 B)

Event Timeline