Skip to content

Commit

Permalink
fix: added new fields to Transition class
Browse files Browse the repository at this point in the history
  • Loading branch information
Veronika Akhapkina authored and CptBronzebeard committed Mar 6, 2024
1 parent 7ed4972 commit addea3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class StateBuilder<B : BotRequest, R : Reactions> internal constructor(
fun activators(@PathValue fromState: String = parent.toString(), body: ActivationRulesBuilder.() -> Unit) {
val toState = path.toString()
val rules = ActivationRulesBuilder().apply(body).build()
val transitions = rules.map { Transition(fromState, toState, it) }
val transitions = rules.map { Transition(fromState, toState, it, modal, noContext) }
scenarioModelBuilder.transitions.addAll(transitions)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ import com.justai.jaicf.model.activation.ActivationRule
data class Transition(
val fromState: String,
val toState: String,
val rule: ActivationRule
val rule: ActivationRule,
val modal: Boolean,
val noContext: Boolean
)

0 comments on commit addea3a

Please sign in to comment.