Support the tplParams feature in MessageTemplate.send with disable_smarty=1
The MessageTemplate.send API takes an optional template_params
or tplParams
key, which is an array of key => value
such that content like ${key}
inside of a message gets translated to value
.
This is a really useful feature for adding custom, one-off use tokens.
However, the current implementation relies on Smarty to do the substitutions. This then fails when the API is called with the disable_smarty
param.
This PR applies the tplParams
to the message template when not using Smarty.