[telegram] Fixing some bugs

Went through some test cases and noticed that I forgot about
consecutive spaces. If you ever code larger projects be sure
to test as you code and consider using a testing framework.