Skip to content

Commit

Permalink
Received Digit fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
docwho2 committed Dec 2, 2023
1 parent e618f11 commit b4ab4b5
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import cloud.cleo.chimesma.model.*;
import static cloud.cleo.chimesma.model.SMARequest.SMAEventType.DIGITS_RECEIVED;
import java.util.Map;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
Expand Down Expand Up @@ -34,9 +35,17 @@ protected StringBuilder getDebugSummary() {
.append(" [").append(getInputDigitsRegex()).append(']');
}

/**
* Override this because this is special case where ID needs to be
* set at render time, not after success like LexBot for example.
*
* @return
*/
@Override
protected void onActionSuccessful() {
setTransactionAttribute(RECEIVE_DIGITS_ID, getId().toString());
public Map<String, Object> getTransactionAttributes() {
final var attrs = super.getTransactionAttributes();
attrs.put(RECEIVE_DIGITS_ID, getId().toString());
return attrs;
}

@Override
Expand Down

0 comments on commit b4ab4b5

Please sign in to comment.