Closed zio3 closed 8 months ago
I can use it on Reply, but on the other nodes, FlexMassage can't send it and I get a 400 Batrequest. I looked through the source code and it seems that only Reply is supported. Is there any way to make it available for other nodes?
@zio3 Thank you. I will consider it.
v0.2.1でPush_Newというノードを追加しました。Functionノードを間に挟んでFlexMessageを送ることができるようになりました。
msg.payload = {
"type": "flex",
"altText": "this is a flex message",
"contents": {
"type": "bubble",
"header": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": "どっちが好きですか?"
}
]
},
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "button",
"action": {
"type": "postback",
"label": "Node-RED",
"data": "hogehoge",
"displayText": "のーどれっど"
},
"color": "#00cc33",
"gravity": "top"
},
{
"type": "button",
"action": {
"type": "postback",
"label": "Node.js",
"data": "hugahuga",
"displayText": "コード書きたい"
}
}
]
}
}
}
return msg;
Replyでは利用できるのですが、そのほかのノードではFlexMassageが送信できずに400 Batrequestになってしまいます。 ソースコードをのぞいたら、Replyだけが対応されていたようです。 ほかのノードでも利用できるようになりませんでしょうか?