Skip to content

Commit

Permalink
#1682 whatsAppCloudTextParameterTemplate - fix problem with spanish (#…
Browse files Browse the repository at this point in the history
…1683)

* #1682 whatsAppCloudTextParameterTemplate - fix problem with spanish

* #1682 whatsAppCloudTextParameterTemplate - use ParameterType in parameter instead of charSequence

* #1682 whatsAppCloudTextParameterTemplate - use ParameterType in parameter instead of charSequence + add deprecated method

---------

Co-authored-by: charles_moulhaud <[email protected]>
  • Loading branch information
asus007 and charles_moulhaud authored Aug 20, 2024
1 parent dd5a73f commit 1f3bd4f
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,20 @@ fun <T : Bus<T>> T.whatsAppCloudBodyTemplate(
parameters = parameters
)

@Deprecated("use whatsAppCloudTextParameterTemplate(typeParameter: ParameterType,textButton: CharSequence?) instead")
fun <T : Bus<T>> T.whatsAppCloudTextParameterTemplate(
typeParameter: CharSequence?,
textButton: CharSequence?
): TextParameter = TextParameter(
type = ParameterType.valueOf(translate(typeParameter).toString()),
type = ParameterType.valueOf((typeParameter).toString()),
text = translate(textButton).toString(),
)

fun <T : Bus<T>> T.whatsAppCloudTextParameterTemplate(
typeParameter: ParameterType,
textButton: CharSequence?
): TextParameter = TextParameter(
type = typeParameter,
text = translate(textButton).toString(),
)

Expand Down

0 comments on commit 1f3bd4f

Please sign in to comment.