integrationConnect.route('getData', (message) => {
message['response'] = {
payload: {},
success: true
};
message.response.payload['public'] = JSON.parse(localStorage.getItem('public_settings'));
message.response.payload['private'] = JSON.parse(localStorage.getItem('private_settings'));
message.response.payload['command'] = 'Отправить сообщение';
message.response.payload['description'] = 'ChatId 1000000';
message.send();//Отправим ответ
});
//ожидаемая Senler'ом структра данных собщения
{
"payload": {
"public": "123 123 123 %last_name%",
"private": [
{
"id": "ToIl1LHrgzX-VEMg55yCy",
"chat_id": "560572781",
"token": "1925730357:AAELFz-Rm43Eavdw5wc3mrCxX4319iqWwpe0",
"user_id": 1667583788069
}
],
"command": "Отправить сообщение",
"description": "ChatId 1000000",
},
"success": true
}