Setting dialogId now in a central place
This commit is contained in:
parent
333747a5e4
commit
fcda1a0e1a
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue