Fix sync response for send object (#335)

This commit is contained in:
Ramsey Smith 2023-12-06 13:12:07 -07:00 committed by Álison Fernandes
parent b0e3aca323
commit 6844c57248
3 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@ import java.time.format.DateTimeFormatter
*/ */
class LocalDateTimeSerializer : KSerializer<LocalDateTime> { class LocalDateTimeSerializer : KSerializer<LocalDateTime> {
private val dateTimeFormatterDeserialization = DateTimeFormatter private val dateTimeFormatterDeserialization = DateTimeFormatter
.ofPattern("yyyy-MM-dd'T'HH:mm:ss.[SSSSSSS][SSSSSS][SSSSS][SSSS][SSS][SS][S]'Z'") .ofPattern("yyyy-MM-dd'T'HH:mm:ss[.][:][SSSSSSS][SSSSSS][SSSSS][SSSS][SSS][SS][S]'Z'")
private val dateTimeFormatterSerialization = private val dateTimeFormatterSerialization =
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
override val descriptor: SerialDescriptor override val descriptor: SerialDescriptor

View file

@ -882,7 +882,7 @@ data class SyncResponseJson(
val password: String?, val password: String?,
@SerialName("file") @SerialName("file")
val file: File, val file: File?,
@SerialName("deletionDate") @SerialName("deletionDate")
@Contextual @Contextual

View file

@ -28,7 +28,7 @@ fun SyncResponseJson.Send.toEncryptedSdkSend(): Send =
key = key.toString(), key = key.toString(),
password = password, password = password,
type = type.toSdkSendType(), type = type.toSdkSendType(),
file = file.toEncryptedSdkFile(), file = file?.toEncryptedSdkFile(),
text = text.toEncryptedSdkText(), text = text.toEncryptedSdkText(),
maxAccessCount = maxAccessCount?.toUInt(), maxAccessCount = maxAccessCount?.toUInt(),
accessCount = accessCount.toUInt(), accessCount = accessCount.toUInt(),