Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react): Allow user input preprocess in blockInputs #2219

Merged
merged 2 commits into from
Feb 23, 2022

Conversation

asastre
Copy link
Contributor

@asastre asastre commented Feb 22, 2022

Description

Allow user input preprocess in the blockInputs configuration in order to sanitize the user input if needed.

Also, removed BotOptions interface to use CoreBotConfig instead.

Context

Some text detection through regular expressions are easier if you can remove certain characters from the text before searching for matches (for example phone or credit card numbers)

Approach taken / Explain the design

Added a preprocess attribute in blockInputs option in webchat configuration that will be executed before doing the matches of the regular expressions to detect blocking words.

To document / Usage example

Testing

The pull request has no tests.

@asastre asastre merged commit 42c9085 into master-lts Feb 23, 2022
@asastre asastre deleted the react/preprocess-block-inputs branch February 23, 2022 08:49
vanbasten17 pushed a commit that referenced this pull request Mar 23, 2023
* feat(react): allow user input preprocessing before checking the regexp in blockInputs

* style(react): remove BotOptions interface and use core.CoreBotConfig instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants