go-rest-api
go-rest-api copied to clipboard
HSM can not include components
Hi, I would like to send HSM having components. The raw json is like below.
{
"to": "{number}",
"from": "{channel}",
"type": "hsm",
"content": {
"hsm": {
"namespace": "{namespace},
"templateName": "{template_name}",
"language": {
"code": "id"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "some text here"
},
{
"type": "button",
"sub_type": "url",
"index": 0,
"parameters": [
{
"type": "text",
"text": "button text"
}
]
}
]
}
]
}
}
}
However, conversation.HSM type does not seem to have a way to set the components.
How to do it?
I have created my own HSM type and used Request of messagebird.DefaultClient to send components as a workaround.
I still want the HSM containing the components to send it with conversation.SendMessage.