So, I\'m currently using this:
The other answer provided is helpful but it overwrites channelData. For others finding this answer and just wanting to send custom parameters, this will be helpful:
const originalDirectline = props.webchat.createDirectLine({
token,
})
const directLine = Object.assign({}, originalDirectline, {
postActivity: (activity: any) => {
const newActivity = Object.assign({}, activity)
newActivity.customParam = "custom value"
return originalDirectline.postActivity(newActivity)
}
})