diff --git a/transport/src/androidUnitTest/kotlin/transport/core/MessageExtensionTest.kt b/transport/src/androidUnitTest/kotlin/transport/core/MessageExtensionTest.kt index 6fb6ae49..62061775 100644 --- a/transport/src/androidUnitTest/kotlin/transport/core/MessageExtensionTest.kt +++ b/transport/src/androidUnitTest/kotlin/transport/core/MessageExtensionTest.kt @@ -42,7 +42,6 @@ import com.genesys.cloud.messenger.transport.utility.MessageValues import com.genesys.cloud.messenger.transport.utility.QuickReplyTestValues import com.genesys.cloud.messenger.transport.utility.StructuredMessageValues import com.genesys.cloud.messenger.transport.utility.TestValues -import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import net.bytebuddy.utility.RandomString import org.junit.Test @@ -172,13 +171,13 @@ internal class MessageExtensionTest { "first test attachment id" to Attachment( id = "first test attachment id", fileName = "test.png", - fileSize = AttachmentValues.FileSize, + fileSizeInBytes = AttachmentValues.FileSize, Attachment.State.Uploaded("http://test.com") ), "second test attachment id" to Attachment( id = "second test attachment id", fileName = "test2.png", - fileSize = null, + fileSizeInBytes = null, Attachment.State.Detached, ) ) @@ -188,7 +187,7 @@ internal class MessageExtensionTest { attachment = Attachment( id = "first test attachment id", fileName = "test.png", - fileSize = AttachmentValues.FileSize, + fileSizeInBytes = AttachmentValues.FileSize, state = Attachment.State.Uploaded("http://test.com") ) ) diff --git a/transport/src/commonMain/kotlin/com/genesys/cloud/messenger/transport/core/Attachment.kt b/transport/src/commonMain/kotlin/com/genesys/cloud/messenger/transport/core/Attachment.kt index aa69133c..7f0aff76 100644 --- a/transport/src/commonMain/kotlin/com/genesys/cloud/messenger/transport/core/Attachment.kt +++ b/transport/src/commonMain/kotlin/com/genesys/cloud/messenger/transport/core/Attachment.kt @@ -10,7 +10,7 @@ import kotlinx.serialization.Transient data class Attachment( val id: String, @Transient val fileName: String? = null, - @Transient val fileSize: Int? = null, + @Transient val fileSizeInBytes: Int? = null, @Transient val state: State = State.Presigning, ) { /** diff --git a/transport/src/commonMain/kotlin/com/genesys/cloud/messenger/transport/util/extensions/MessageExtension.kt b/transport/src/commonMain/kotlin/com/genesys/cloud/messenger/transport/util/extensions/MessageExtension.kt index 5b49e711..f8d9751c 100644 --- a/transport/src/commonMain/kotlin/com/genesys/cloud/messenger/transport/util/extensions/MessageExtension.kt +++ b/transport/src/commonMain/kotlin/com/genesys/cloud/messenger/transport/util/extensions/MessageExtension.kt @@ -78,7 +78,7 @@ private fun List.toAttachments(): Map { attachment.id to Attachment( id = attachment.id, fileName = attachment.filename, - fileSize = attachment.fileSize, + fileSizeInBytes = attachment.fileSize, state = Attachment.State.Sent(attachment.url), ) }