Skip to content

Commit

Permalink
hot-fix/add thumbnail to info in sendFileEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlockvn authored and hoangdat committed Sep 19, 2023
1 parent adfb00a commit 2361495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/presentation/extensions/send_file_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ extension SendFileExtension on Room {
'thumbnail_url': thumbnailUploadResp.toString(),
if (thumbnail != null && encryptedThumbnail != null)
'thumbnail_file': encryptedThumbnail.toJson(),
if (thumbnail != null) 'thumbnail_info': thumbnail.metadata,
}..addAll(thumbnail?.metadata ?? {}),
if (extraContent != null) ...extraContent,
};
Expand Down
3 changes: 2 additions & 1 deletion lib/presentation/extensions/send_file_web_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ extension SendFileWebExtension on Room {
'kty': 'oct'
},
'iv': encryptedThumbnail.iv,
'hashes': {'sha256': encryptedThumbnail.sha256}
'hashes': {'sha256': encryptedThumbnail.sha256},
},
if (thumbnail != null) 'thumbnail_info': thumbnail.info,
}..addAll(thumbnail?.info ?? {}),
if (extraContent != null) ...extraContent,
};
Expand Down

0 comments on commit 2361495

Please sign in to comment.