shurillu / CTBot

A simple (and easy to use) Arduino Telegram BOT Library for ESP8266/ESP32
MIT License
151 stars 35 forks source link

Issues when trying to send specific messages ("H" after first space) #16

Closed Salomon-MH closed 5 years ago

Salomon-MH commented 5 years ago

Hey,

I encountered a very weird bug. Some relatively random messages seem to be impossible to send. For instance:

myBot.sendMessage(ID, "SomeText HtheH@TheBeginningIsImportant"); myBot.sendMessage(ID, "SomeText Howdy"); myBot.sendMessage(ID, "Sunny Hunter"); myBot.sendMessage(ID, "Super Hamster");

So for some reason, if there is a capital H after the first space, the message will not be sent and sendMessage returns "false". Everything else will be sent just fine, a small "h" does work aswell.

Why is it like that? It breaks something I want to do and I cant seem to find a fix for this. Any idea?

shurillu commented 5 years ago

This is a very weird behavior! I investigated and it is dued to a non correct space character managing Now I filter all the spaces and the issue is no more. I pushed all the changes in the master branch as you can download it and check it. Please let me know if the new version is ok as I can release it.

Thanks!

Stefano

Salomon-MH commented 5 years ago

That fixed it. Thanks for the quick fix! 😊 image