@@ -43,6 +43,8 @@ const FormSchema = z.object({
4343 debounceTime : z . string ( ) ,
4444 ignoreJids : z . array ( z . string ( ) ) . default ( [ ] ) ,
4545 botIdFallback : z . union ( [ z . null ( ) , z . string ( ) ] ) . optional ( ) ,
46+ splitMessages : z . boolean ( ) ,
47+ timePerChar : z . string ( ) ,
4648} ) ;
4749
4850function DefaultSettingsEvolutionBot ( ) {
@@ -75,6 +77,8 @@ function DefaultSettingsEvolutionBot() {
7577 debounceTime : "0" ,
7678 ignoreJids : [ ] ,
7779 botIdFallback : undefined ,
80+ splitMessages : false ,
81+ timePerChar : "0" ,
7882 } ,
7983 } ) ;
8084
@@ -95,6 +99,10 @@ function DefaultSettingsEvolutionBot() {
9599 : "0" ,
96100 ignoreJids : settings . ignoreJids ,
97101 botIdFallback : settings . botIdFallback ,
102+ splitMessages : settings . splitMessages ,
103+ timePerChar : settings . timePerChar
104+ ? settings . timePerChar . toString ( )
105+ : "0" ,
98106 } ) ;
99107 }
100108 // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -117,6 +125,8 @@ function DefaultSettingsEvolutionBot() {
117125 debounceTime : parseInt ( data . debounceTime ) ,
118126 botIdFallback : data . botIdFallback || undefined ,
119127 ignoreJids : data . ignoreJids ,
128+ splitMessages : data . splitMessages ,
129+ timePerChar : parseInt ( data . timePerChar ) ,
120130 } ;
121131
122132 await setDefaultSettingsEvolutionBot ( {
@@ -219,6 +229,21 @@ function DefaultSettingsEvolutionBot() {
219229 < Input type = "number" />
220230 </ FormInput >
221231
232+ < FormSwitch
233+ name = "splitMessages"
234+ label = { t ( "evolutionBot.form.splitMessages.label" ) }
235+ reverse
236+ />
237+
238+ { form . watch ( "splitMessages" ) && (
239+ < FormInput
240+ name = "timePerChar"
241+ label = { t ( "evolutionBot.form.timePerChar.label" ) }
242+ >
243+ < Input type = "number" />
244+ </ FormInput >
245+ ) }
246+
222247 < FormTags
223248 name = "ignoreJids"
224249 label = { t ( "evolutionBot.form.ignoreJids.label" ) }
0 commit comments