Prevent crash when sharing file from native gallery due to chatRoom not being initialized yet (but it is not needed)

This commit is contained in:
Sylvain Berfini 2025-02-27 09:58:54 +01:00
parent 01c079440d
commit e05d4cf94a

View file

@ -397,7 +397,7 @@ class SendMessageInConversationViewModel
val fileName = FileUtils.getNameFromFilePath(file)
val timestamp = System.currentTimeMillis() / 1000
val model = FileModel(file, fileName, 0, timestamp, false, file, chatRoom.isEphemeralEnabled) { model ->
val model = FileModel(file, fileName, 0, timestamp, false, file, false) { model ->
removeAttachment(model.path)
}