Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Prepare for merge

Manav Rathiaf4064b97a3a
diff --git a/web/apps/photos/src/components/PhotoViewer/FileInfo/RenderCreationTime.tsx b/web/apps/photos/src/components/PhotoViewer/FileInfo/RenderCreationTime.tsx
index ea092d77ae..0bba0c6897 100644
--- a/web/apps/photos/src/components/PhotoViewer/FileInfo/RenderCreationTime.tsx
+++ b/web/apps/photos/src/components/PhotoViewer/FileInfo/RenderCreationTime.tsx
@@ -47,7 +47,7 @@ export function RenderCreationTime({
/* TODO(MR): Exif */
// eslint-disable-next-line no-constant-condition
- if (false) {
+ if (true) {
const updatedFile = await changeFileCreationTime(
file,
editedTime,
@@ -55,7 +55,7 @@ export function RenderCreationTime({
updateExistingFilePubMetadata(file, updatedFile);
}
// eslint-disable-next-line no-constant-condition
- if (true) {
+ if (false) {
const cryptoWorker =
await ComlinkCryptoWorker.getInstance();
await updateRemotePublicMagicMetadata(
diff --git a/web/packages/media/file-metadata.ts b/web/packages/media/file-metadata.ts
index bcb8216c7b..ae689797d9 100644
--- a/web/packages/media/file-metadata.ts
+++ b/web/packages/media/file-metadata.ts
@@ -137,6 +137,24 @@ export enum ItemVisibility {
* with whom the file has been shared.
*
* For more details, see [Note: Metadatum].
+ *
+ * ---
+ *
+ * [Note: Optional magic metadata keys]
+ *
+ * Remote does not support nullish (`undefined` or `null`) values for the keys
+ * in the magic metadata associated with a file. All of the keys themselves are
+ * optional though.
+ *
+ * That is, all magic metadata properties are of the form:
+ *
+ * foo?: T
+ *
+ * And never like:
+ *
+ * foo: T | undefined
+ *
+ * Also see: [Note: Zod doesn't work with `exactOptionalPropertyTypes` yet].
*/
export interface PublicMagicMetadata {
/**
@@ -398,6 +416,7 @@ export const updateMagicMetadataRequest = async (
encryptMetadataF: EncryptMetadataF,
): Promise<UpdateMagicMetadataRequest> => {
// Drop all null or undefined values to obtain the syncable entries.
+ // See: [Note: Optional magic metadata keys].
const validEntries = Object.entries(metadata).filter(
([, v]) => v !== null && v !== undefined,
);