[mob] Fix: Handle null nonce for shared collections

This commit is contained in:
Neeraj Gupta
2025-03-13 17:12:26 +05:30
parent 822eb59761
commit abc6f56247

View File

@@ -12,6 +12,7 @@ class Collection {
final int id;
final User owner;
final String encryptedKey;
// keyDecryptionNonce will be empty string for collections shared with the user
final String keyDecryptionNonce;
String? name;
final CollectionType type;
@@ -79,7 +80,9 @@ class Collection {
id: collection.id,
owner: collection.owner,
encryptedKey: collection.encryptedKey,
keyDecryptionNonce: collection.keyDecryptionNonce!,
// note: keyDecryptionNonce will be null in case of collections
// shared with the user
keyDecryptionNonce: collection.keyDecryptionNonce ?? '',
name: collection.displayName,
type: collection.type,
sharees: collection.sharees,