这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@CrazyBoy49z
Copy link

@CrazyBoy49z CrazyBoy49z commented Apr 23, 2024

Closes #4

The previous implementation of Dialog and DialogManager was refactored to improve key generation. Instead of using just chatId, it is now combined with userId to generate a unique key for a dialog. This solution further enhance balance between performance and security for reading and storing dialog states. Some unnecessary methods and properties were also cleaned up in the process.

The previous implementation of Dialog and DialogManager was refactored to improve key generation. Instead of using just chatId, it is now combined with userId to generate a unique key for a dialog. This solution further enhance balance between performance and security for reading and storing dialog states. Some unnecessary methods and properties were also cleaned up in the process.
Two new methods have been added to the Dialog class: "beforeAllStep" and "afterAllStep". These methods, which can be overridden for custom functionality, will run at the start and end of a Dialog sequence respectively. Additionally, a check has been implemented to determine when the Dialog has started.
The same line setting variable $currentStepIndex to $this->next was unnecessarily repeated in the script. This redundancy was removed to enhance code efficiency and improve readability.
@CrazyBoy49z
Copy link
Author

#4

@lptn lptn self-requested a review April 28, 2024 22:46
Copy link
Collaborator

@alies-dev alies-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

I'll update tests and release soon

@lptn lptn merged commit 46864d9 into koot-labs:master May 10, 2024
@alies-dev
Copy link
Collaborator

hey @CrazyBoy49z

I found an opportunity to add this feature without introducing breaking changes. It's already released, but, unfortunately, it will not be compatible with your integration (at least during serialisation and unserialization). I hope it will not be a big issue for you to continue to use this package.

@alies-dev alies-dev removed the request for review from lptn May 10, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Dialog in group has bug

3 participants