Closed danfercf1 closed 1 month ago
After the admin takes the dispute I got this error and the message with order details is not sent:
[2024-09-05T14:49:35.397-03:00] error: 400: Bad Request: can't parse entities: Can't find end of Italic entity at byte offset 1203 Error: 400: Bad Request: can't parse entities: Can't find end of Italic entity at byte offset 1203 at Telegram.callApi (/home/grunch/dev/bot-danfer/node_modules/telegraf/lib/core/network/client.js:315:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async exports.disputeData (/home/grunch/dev/bot-danfer/bot/modules/dispute/messages.js:102:5) at async exports.takeDispute (/home/grunch/dev/bot-danfer/bot/modules/dispute/actions.js:39:3) at async execute (/home/grunch/dev/bot-danfer/node_modules/telegraf/lib/composer.js:518:17) at async /home/grunch/dev/bot-danfer/node_modules/telegraf/lib/composer.js:519:21
@grunch, I will take a look, could you provide me the usernames that you are testing?
After the admin takes the dispute I got this error and the message with order details is not sent:
[2024-09-05T14:49:35.397-03:00] error: 400: Bad Request: can't parse entities: Can't find end of Italic entity at byte offset 1203 Error: 400: Bad Request: can't parse entities: Can't find end of Italic entity at byte offset 1203 at Telegram.callApi (/home/grunch/dev/bot-danfer/node_modules/telegraf/lib/core/network/client.js:315:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async exports.disputeData (/home/grunch/dev/bot-danfer/bot/modules/dispute/messages.js:102:5) at async exports.takeDispute (/home/grunch/dev/bot-danfer/bot/modules/dispute/actions.js:39:3) at async execute (/home/grunch/dev/bot-danfer/node_modules/telegraf/lib/composer.js:518:17) at async /home/grunch/dev/bot-danfer/node_modules/telegraf/lib/composer.js:519:21
@grunch, I will take a look, could you provide me the usernames that you are testing?
users: @negrunch and @xxx_yyy
After the admin takes the dispute I got this error and the message with order details is not sent:
[2024-09-05T14:49:35.397-03:00] error: 400: Bad Request: can't parse entities: Can't find end of Italic entity at byte offset 1203 Error: 400: Bad Request: can't parse entities: Can't find end of Italic entity at byte offset 1203 at Telegram.callApi (/home/grunch/dev/bot-danfer/node_modules/telegraf/lib/core/network/client.js:315:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async exports.disputeData (/home/grunch/dev/bot-danfer/bot/modules/dispute/messages.js:102:5) at async exports.takeDispute (/home/grunch/dev/bot-danfer/bot/modules/dispute/actions.js:39:3) at async execute (/home/grunch/dev/bot-danfer/node_modules/telegraf/lib/composer.js:518:17) at async /home/grunch/dev/bot-danfer/node_modules/telegraf/lib/composer.js:519:21
@grunch, I will take a look, could you provide me the usernames that you are testing?
users: @negrunch and @xxx_yyy
I will take a look, thanks
After the admin takes the dispute I got this error and the message with order details is not sent:
[2024-09-05T14:49:35.397-03:00] error: 400: Bad Request: can't parse entities: Can't find end of Italic entity at byte offset 1203 Error: 400: Bad Request: can't parse entities: Can't find end of Italic entity at byte offset 1203 at Telegram.callApi (/home/grunch/dev/bot-danfer/node_modules/telegraf/lib/core/network/client.js:315:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async exports.disputeData (/home/grunch/dev/bot-danfer/bot/modules/dispute/messages.js:102:5) at async exports.takeDispute (/home/grunch/dev/bot-danfer/bot/modules/dispute/actions.js:39:3) at async execute (/home/grunch/dev/bot-danfer/node_modules/telegraf/lib/composer.js:518:17) at async /home/grunch/dev/bot-danfer/node_modules/telegraf/lib/composer.js:519:21
@grunch, I will take a look, could you provide me the usernames that you are testing?
users: @negrunch and @xxx_yyy
I will take a look, thanks
The issue was fixed
I can update the other languages after I receive the ok for the current message for these first ones that I updated.
After you push this commit it will be merged
Added a method to escape underscores when an user of Telegram has underscore in its username, this is necessary due the configuration for the message when it's set to "{ parse_mode: 'MarkdownV2' }". Additionally I added the necessary tests to verify the fix. I added the telegram id to the translation message for Spanish and English, I can update the other languages after I receive the ok for the current message for these first ones that I updated.
Fixes #543