lukefx / hubot-telegram

Hubot adapter for Telegram
MIT License
160 stars 42 forks source link

Telegram's extra options should be always strings #42

Closed lukefx closed 8 years ago

lukefx commented 8 years ago

Not a real issue but just an important thing, while sending messages to channels without a response or hear, all extra parameters should be strings or it will cause an exception.

Example:

post_to_channel = (message) ->
  envelope =
    room: "@mychannel"
    telegram:
      reply_markup: "Markdown"
      disable_web_page_preview: 'true'
  robot.send envelope, message

We can't use disable_web_page_preview: true

Could we modify the applyExtraOptions function to encode extra params to strings?

arcturial commented 8 years ago

@lukefx please review https://github.com/lukefx/hubot-telegram/pull/48

arcturial commented 8 years ago

This started working for me without the "toString" casting. You still having issues on your side?

lukefx commented 8 years ago

52 and #54 address this issue...closing it