From 2ab10f77d43003f1f15f3f24755d69a31973898b Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 21 Nov 2024 21:00:34 +0100 Subject: [PATCH] Fixed that from may is null --- .../src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt | 2 +- .../main/kotlin/net/codinux/invoicing/mail/MailWithInvoice.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt b/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt index f5b5933..66d5d41 100644 --- a/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt +++ b/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt @@ -110,7 +110,7 @@ class MailReader( if (attachmentsWithEInvoice.isNotEmpty()) { return MailWithInvoice( - message.from.joinToString(), message.subject, + message.from?.joinToString(), message.subject, message.sentDate?.let { map(it) }, map(message.receivedDate), message.messageNumber, getPlainTextBody(parts), getHtmlBody(parts), attachmentsWithEInvoice diff --git a/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailWithInvoice.kt b/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailWithInvoice.kt index 3f56b39..2c60112 100644 --- a/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailWithInvoice.kt +++ b/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailWithInvoice.kt @@ -4,7 +4,7 @@ import java.time.Instant import java.time.ZoneId class MailWithInvoice( - val sender: String, + val sender: String?, val subject: String, val sent: Instant?, val received: Instant,