1
0
mirror of synced 2024-11-25 21:26:02 +03:00

improve translate and SendData message

This commit is contained in:
DmitryZagorulko 2018-09-12 11:24:44 +03:00
parent 121988dae4
commit 48345fc6de
6 changed files with 9 additions and 12 deletions

View File

@ -20,7 +20,6 @@ var (
logger *logging.Logger logger *logging.Logger
options Options options Options
parser = flags.NewParser(&options, flags.Default) parser = flags.NewParser(&options, flags.Default)
tokenCounter uint32
rx = regexp.MustCompile(`/+$`) rx = regexp.MustCompile(`/+$`)
) )

View File

@ -380,14 +380,11 @@ func telegramWebhookHandler(c *gin.Context) {
} }
snd := v1.SendData{ snd := v1.SendData{
Message: v1.SendMessage{
Message: v1.Message{ Message: v1.Message{
ExternalID: strconv.Itoa(update.Message.MessageID), ExternalID: strconv.Itoa(update.Message.MessageID),
Type: "text", Type: "text",
Text: update.Message.Text, Text: update.Message.Text,
}, },
SentAt: time.Now(),
},
User: v1.User{ User: v1.User{
ExternalID: strconv.Itoa(update.Message.From.ID), ExternalID: strconv.Itoa(update.Message.From.ID),
Nickname: nickname, Nickname: nickname,

View File

@ -18,6 +18,7 @@ import (
) )
var ( var (
tokenCounter uint32
credentialsTransport = []string{ credentialsTransport = []string{
"/api/integration-modules/{code}", "/api/integration-modules/{code}",
"/api/integration-modules/{code}/edit", "/api/integration-modules/{code}/edit",

View File

@ -27,7 +27,7 @@ error_creating_webhook: Error when creating a webhook
error_adding_bot: Error when adding a bot error_adding_bot: Error when adding a bot
error_save: Error while saving, contact technical support error_save: Error while saving, contact technical support
missing_credentials: "Required methods: {{.Credentials}}" missing_credentials: "Required methods: {{.Credentials}}"
error_activity_mg: Check if the integration with MessageGateway is enabled in retailCRM settings error_activity_mg: Check if the integration with retailCRM Chat is enabled in retailCRM settings
info_bot: "If you have a problem with connecting a bot, please, refer to the <a target='_blank' href='//www.retailcrm.pro/docs/Users/Telegram'>documentation</a>" info_bot: "If you have a problem with connecting a bot, please, refer to the <a target='_blank' href='//www.retailcrm.pro/docs/Users/Telegram'>documentation</a>"
crm_link: "<a href='//www.retailcrm.pro' title='retailCRM'>retailCRM</a>" crm_link: "<a href='//www.retailcrm.pro' title='retailCRM'>retailCRM</a>"
doc_link: "<a href='//www.retailcrm.pro/docs' target='_blank'>documentation</a>" doc_link: "<a href='//www.retailcrm.pro/docs' target='_blank'>documentation</a>"

View File

@ -27,7 +27,7 @@ error_creating_webhook: Error al crear el webhook
error_adding_bot: Error al añadir el bot error_adding_bot: Error al añadir el bot
error_save: Error al guardar, contacte con el soporte técnico error_save: Error al guardar, contacte con el soporte técnico
missing_credentials: "Métodos requeridos: {{.Credenciales}}" missing_credentials: "Métodos requeridos: {{.Credenciales}}"
error_activity_mg: Revisar si la integración con MessageGateway está habilitada en Ajustes de retailCRM error_activity_mg: Revisar si la integración con retailCRM Chat está habilitada en Ajustes de retailCRM
info_bot: "Si tiene dificultades para conectar el bot, por favor, consulte la <a target='_blank' href='//www.retailcrm.pro/docs/Users/Telegram'>documentación</a>" info_bot: "Si tiene dificultades para conectar el bot, por favor, consulte la <a target='_blank' href='//www.retailcrm.pro/docs/Users/Telegram'>documentación</a>"
crm_link: "<a href='//www.retailcrm.pro' title='retailCRM'>retailCRM</a>" crm_link: "<a href='//www.retailcrm.pro' title='retailCRM'>retailCRM</a>"
doc_link: "<a href='//www.retailcrm.pro/docs' target='_blank'>documentación</a>" doc_link: "<a href='//www.retailcrm.pro/docs' target='_blank'>documentación</a>"

View File

@ -27,7 +27,7 @@ error_creating_webhook: Ошибка при создании webhook
error_adding_bot: Ошибка при добавлении бота error_adding_bot: Ошибка при добавлении бота
error_save: Ошибка при сохранении, обратитесь в службу технической поддержки error_save: Ошибка при сохранении, обратитесь в службу технической поддержки
missing_credentials: "Необходимые методы: {{.Credentials}}" missing_credentials: "Необходимые методы: {{.Credentials}}"
error_activity_mg: Проверьте активность интеграции с MessageGateway в настройках retailCRM error_activity_mg: Проверьте активность интеграции с retailCRM Chat в настройках retailCRM
info_bot: "Если у вас возникли трудности при подключении бота, изучите, пожалуйста, <a target='_blank' href='//www.retailcrm.ru/docs/Users/Telegram'>документацию</a>" info_bot: "Если у вас возникли трудности при подключении бота, изучите, пожалуйста, <a target='_blank' href='//www.retailcrm.ru/docs/Users/Telegram'>документацию</a>"
crm_link: "<a href='//www.retailcrm.ru' title='retailCRM'>retailCRM</a>" crm_link: "<a href='//www.retailcrm.ru' title='retailCRM'>retailCRM</a>"
doc_link: "<a href='//www.retailcrm.ru/docs' target='_blank'>документация</a>" doc_link: "<a href='//www.retailcrm.ru/docs' target='_blank'>документация</a>"