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> {
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 =
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
override val descriptor: SerialDescriptor

View file

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

View file

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