Empty message response when using custom payloads for socketio channel

Hi,

I’m currently migrating my bot from Rasa 1.x to Rasa 2.x. However, sending custom payloads to a socketio channel seems to not work in the latest version of Rasa (2.1.0). The rasa-webchat receives a bot_uttered event but the message payload is always empty when the utterance contains custom payloads. This does not happen if the bot response type is predetermined (text, buttons, etc)

By looking at the logs, the BotUttered event is sending the correct message payload. Here’s the JSON data that is returned by the event:

text: None

data:

{
   "elements":null,
   "quick_replies":null,
   "buttons":null,
   "attachment":null,
   "image":null,
   "custom":{
      "attachment":{
         "type":"template",
         "payload":{
            "template_type":"generic",
            "elements":[
               {
                  "default_action":{
                     "type":"carousel_item",
                     "url":"",
                     "payload":"",
                     "title":""
                  },
                  "image_url":"https://www.aupairconecta.com/sites/default/files/v211batch11-aum-546-questionmark_2.jpg",
                  "title":"Preguntas Frecuentes",
                  "subtitle":"Informaci\u00f3n de procesos de la U",
                  "buttons":[
                     {
                        "title":"Conexi\u00f3n a la red WiFi",
                        "payload":"/connect_wifi",
                        "type":"postback",
                        "url":""
                     },
                     {
                        "title":"\u00bfC\u00f3mo crear un usuario para carrera/curso?",
                        "payload":"/faq_create_user",
                        "type":"postback",
                        "url":""
                     }
                  ]
               },
               {
                  "default_action":{
                     "type":"carousel_item",
                     "url":"",
                     "payload":"",
                     "title":""
                  },
                  "image_url":"https://www.infochannel.info/sites/default/files/2019/04/02/help_desk_app.jpg",
                  "title":"Mesa de Servicios DTIC",
                  "subtitle":"Ayuda con servicios inform\u00e1ticos",
                  "buttons":[
                     {
                        "title":"Reportar una incidencia",
                        "payload":"/open_incident",
                        "type":"postback",
                        "url":""
                     },
                     {
                        "title":"Estado de mi incidencia",
                        "payload":"/get_incident_status",
                        "type":"postback",
                        "url":""
                     },
                     {
                        "title":"Crear un usuario de sistema",
                        "payload":"/create_app_user",
                        "type":"postback",
                        "url":""
                     },
                     {
                        "title":"No recuerdo la contrase\u00f1a",
                        "payload":"/password_reset{\"itilcategory_id\":\"56\"}",
                        "type":"postback",
                        "url":""
                     },
                     {
                        "title":"Problem con correo electr\u00f3nico",
                        "payload":"/problem_email{\"itilcategory_id\":\"53\"}",
                        "type":"postback",
                        "url":""
                     }
                  ]
               },
               {
                  "default_action":{
                     "type":"carousel_item",
                     "url":"",
                     "payload":"",
                     "title":""
                  },
                  "image_url":"https://www.universidades.com.ec/logos/original/logo-universidad-de-cuenca.png",
                  "title":"Procesos Internos",
                  "subtitle":"Uso exclusivo para el personal",
                  "buttons":[
                     {
                        "title":"Reporte Biom\u00e9trico",
                        "payload":"/request_biometrics_report{\"itilcategory_id\":\"60\"}",
                        "type":"postback",
                        "url":""
                     }
                  ]
               }
            ]
         }
      }
   }
}

metadata:

{"channel": "socketio", "template_name": "utter_suggest"}

Here are my bot’s domain file and credentials.yml. The utter_suggest utterance contains two responses (default using buttons, and custom)

What could be the issue?

Thanks for your help

UPDATE: I have reported an issue on the Rasa Github repo and also sent a PR fixing it