1
0
mirror of synced 2024-11-22 04:26:01 +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,8 +20,7 @@ var (
logger *logging.Logger
options Options
parser = flags.NewParser(&options, flags.Default)
tokenCounter uint32
rx = regexp.MustCompile(`/+$`)
rx = regexp.MustCompile(`/+$`)
)
func main() {

View File

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

View File

@ -18,6 +18,7 @@ import (
)
var (
tokenCounter uint32
credentialsTransport = []string{
"/api/integration-modules/{code}",
"/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_save: Error while saving, contact technical support
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>"
crm_link: "<a href='//www.retailcrm.pro' title='retailCRM'>retailCRM</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_save: Error al guardar, contacte con el soporte técnico
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>"
crm_link: "<a href='//www.retailcrm.pro' title='retailCRM'>retailCRM</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_save: Ошибка при сохранении, обратитесь в службу технической поддержки
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>"
crm_link: "<a href='//www.retailcrm.ru' title='retailCRM'>retailCRM</a>"
doc_link: "<a href='//www.retailcrm.ru/docs' target='_blank'>документация</a>"