Fixed that erroneously an error got returned even though lastCreatedMessage was set

This commit is contained in:
dankito 2020-07-21 00:31:15 +02:00
parent 5e2e06b183
commit d18e939818
1 changed files with 5 additions and 4 deletions

View File

@ -852,7 +852,7 @@ open class FinTsClient(
protected open fun resendMessageInNewDialog(lastCreatedMessage: MessageBuilderResult?, previousDialogContext: DialogContext, callback: (Response) -> Unit) {
lastCreatedMessage?.let { // do not use previousDialogContext.currentMessage as this may is previous dialog's dialog close message
if (lastCreatedMessage != null) { // do not use previousDialogContext.currentMessage as this may is previous dialog's dialog close message
val newDialogContext = DialogContext(previousDialogContext.bank, previousDialogContext.customer, previousDialogContext.product, chunkedResponseHandler = previousDialogContext.chunkedResponseHandler)
initDialog(newDialogContext) { initDialogResponse ->
@ -870,9 +870,10 @@ open class FinTsClient(
}
}
}
val errorMessage = "There's no last action (like retrieve account transactions, transfer money, ...) to re-send with new TAN procedure. Probably an internal programming error." // TODO: translate
callback(Response(false, exception = Exception(errorMessage))) // should never come to this
else {
val errorMessage = "There's no last action (like retrieve account transactions, transfer money, ...) to re-send with new TAN procedure. Probably an internal programming error." // TODO: translate
callback(Response(false, exception = Exception(errorMessage))) // should never come to this
}
}