From 2b08db3374cee73feb02d7e85ca556197de8db5c Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 26 Nov 2024 06:06:12 +0100 Subject: [PATCH] Fixed getting parent --- .../kotlin/net/codinux/invoicing/email/FetchEmailsStatus.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/email/FetchEmailsStatus.kt b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/email/FetchEmailsStatus.kt index 2d06fdc..439e2d5 100644 --- a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/email/FetchEmailsStatus.kt +++ b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/email/FetchEmailsStatus.kt @@ -39,8 +39,8 @@ data class FetchEmailsStatus( return part } - (part as? BodyPart)?.parent.let { parent -> - return getMessage(part) + (part as? BodyPart)?.parent?.parent?.let { parent -> + return getMessage(parent) } return null