add default copy realization in BehaviourContextWithFSM

This commit is contained in:
InsanusMokrassar 2022-05-18 16:52:52 +06:00
parent 4643ac906a
commit e3db4250bb
1 changed files with 9 additions and 1 deletions

View File

@ -58,7 +58,15 @@ interface BehaviourContextWithFSM<T : State> : BehaviourContext, StatesMachine<T
triggersHolder: TriggersHolder = this.triggersHolder,
onStateHandlingErrorHandler: StateHandlingErrorHandler<T> = defaultStateHandlingErrorHandler(),
updatesFilter: BehaviourContextAndTypeReceiver<Boolean, Update>? = null
): BehaviourContextWithFSM<T>
): BehaviourContextWithFSM<T> = copy(
bot,
scope,
broadcastChannelsSize,
onBufferOverflow,
upstreamUpdatesFlow,
triggersHolder,
updatesFilter
)
companion object {
operator fun <T : State> invoke(