diff --git a/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt b/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt index af9a2c5d..5d236c3a 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt @@ -93,8 +93,6 @@ open class FinTsClient @JvmOverloads constructor( protected open fun closeAnonymousDialog(dialogContext: DialogContext, response: Response) { dialogContext.increaseMessageNumber() // TODO: move to MessageBuilder - response.messageHeader?.let { header -> dialogContext.dialogId = header.dialogId } // TODO: senseful here? // TODO: move to MessageBuilder - val dialogEndRequestBody = messageBuilder.createAnonymousDialogEndMessage(dialogContext) getAndHandleResponseForMessage(dialogEndRequestBody, dialogContext) @@ -145,8 +143,6 @@ open class FinTsClient @JvmOverloads constructor( updateBankData(bank, response) updateCustomerData(customer, bank, response) - response.messageHeader?.let { header -> dialogContext.dialogId = header.dialogId } - closeDialog(dialogContext) } @@ -469,8 +465,6 @@ open class FinTsClient @JvmOverloads constructor( val response = GetUserTanProceduresResponse(getAndHandleResponseForMessageThatMayRequiresTan(message, dialogContext)) dialogContext.response = response - response.messageHeader?.let { header -> dialogContext.dialogId = header.dialogId } - if (response.successful) { updateBankData(dialogContext.bank, response) updateCustomerData(dialogContext.customer, dialogContext.bank, response) @@ -576,6 +570,8 @@ open class FinTsClient @JvmOverloads constructor( dialogContext.response = response + response.messageHeader?.let { header -> dialogContext.dialogId = header.dialogId } + return response }