Doesn't support sending custom message with json that contains array of objects

I want to send a custom message with this JSON:

    {
       "text":"Hello world!",
       "type":"smart_reply",
       "data":{
          "from":"bot",
          "options":[
             {
                "text":"Option 1",
                "action":"text_reply"
             },
             {
                "text":"Option 2",
                "action":"text_reply"
             },
             {
                "text":"Option 3",
                "action":"text_reply"
             },
             {
                "text":"Option 4",
                "action":"text_reply"
             }
          ]
       }
    }

After creating a custom message by

let message = messagesRepository.createCustomMessage(
     withChannelId: self.channelId,
     data: data
)

So we will never retrieve our data in JSON again, it’s gone completely or it cannot be parsed inside EkoChat.
message.data is always null

Proof:

We tried sending 2 custom messages

//  Smart-Reply Message
{
    "channelId": "test-channel-ios",
    "type": "custom",
    "data": {
        "text": "Hello world!",
        "type": "smart_reply",
        "data": {
            "from": "bot",
            "options": [
                {
                    "text": "โปรโมชั่น",
                    "action": "text_reply"
                },
                {
                    "text": "คำถามที่พบบ่อย",
                    "action": "text_reply"
                },
                {
                    "text": "ซื้อสินค้า",
                    "action": "text_reply"
                },
                {
                    "text": "แชทกับผู้ช่วยของเรา",
                    "action": "text_reply"
                }
            ]
        }
    }
}
// Quick-Reply Message
{
    "channelId": "test-channel-ios",
    "type": "custom",
    "data": {
        "from_fixed_menu": false,
        "action": "text_reply",
        "text": "โปรโมชั่น"
    }
}

The results were as follows:


As you can see the screenshot, the message.data is missing in the top custom message.

Hi @Joseph @su.t ,

Thank you for reporting the issue. We are working on it and the fix will be available in next update.

1 Like