Jelajahi Sumber

Fix bug: send publicMagicMetadata during upload

Neeraj Gupta 2 tahun lalu
induk
melakukan
12edb7a740

+ 1 - 0
lib/generated/intl/messages_nl.dart

@@ -878,6 +878,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "publicLinkEnabled":
             MessageLookupByLibrary.simpleMessage("Publieke link ingeschakeld"),
         "radius": MessageLookupByLibrary.simpleMessage("Straal"),
+        "raiseTicket": MessageLookupByLibrary.simpleMessage("Meld probleem"),
         "rateTheApp": MessageLookupByLibrary.simpleMessage("Beoordeel de app"),
         "rateUs": MessageLookupByLibrary.simpleMessage("Beoordeel ons"),
         "rateUsOnStore": m18,

+ 5 - 2
lib/utils/crypto_util.dart

@@ -305,8 +305,11 @@ class CryptoUtil {
     args["sourceFilePath"] = sourceFilePath;
     args["destinationFilePath"] = destinationFilePath;
     args["key"] = key;
-    return _computer.compute(chachaEncryptFile,
-        param: args, taskName: "encryptFile");
+    return _computer.compute(
+      chachaEncryptFile,
+      param: args,
+      taskName: "encryptFile",
+    );
   }
 
   // Decrypts the file at sourceFilePath, with the given key and header using

+ 4 - 2
lib/utils/file_uploader.dart

@@ -388,14 +388,15 @@ class FileUploader {
         await io.File(encryptedFilePath).delete();
       }
       final encryptedFile = io.File(encryptedFilePath);
-      final fileAttributes = await CryptoUtil.encryptFile(
+      final EncryptionResult fileAttributes = await CryptoUtil.encryptFile(
         mediaUploadData!.sourceFile!.path,
         encryptedFilePath,
         key: key,
       );
       final thumbnailData = mediaUploadData.thumbnail;
 
-      final encryptedThumbnailData = await CryptoUtil.encryptChaCha(
+      final EncryptionResult encryptedThumbnailData =
+          await CryptoUtil.encryptChaCha(
         thumbnailData!,
         fileAttributes.key!,
       );
@@ -480,6 +481,7 @@ class FileUploader {
           await encryptedThumbnailFile.length(),
           encryptedMetadata,
           metadataDecryptionHeader,
+          pubMetadata: pubMetadataRequest,
         );
         if (mediaUploadData.isDeleted) {
           _logger.info("File found to be deleted");