Closed UnAfraid closed 9 years ago
Actually i just figured it out, am gonna do pull request now.
Ok (:
This sendPhoto problem is kinda weird. First it got fixed when i changed encodings to UTF-8, then i started throwing bad gateway again :O
That's weird I have some integration tests that send a photo, but I assume your having issues with the caption? Also haven' t tested message with reply markup. Ah, I see the test is now failing very strange.
No, i am using this method:
org.codespartans.telegram.bot.TelegramBot.sendPhoto(int, File)
It doesn't includes caption
I've included the pull request with charset changes here: https://github.com/Reefstah/TelegramBotAPI/pull/3
Now mysteriously out of nowhere it started working again.
Haha I was guessing a Telegram issue, but a friend tested for me with a Node project which worked fine and now the sendLocation is failing. ;d
My friend is using PHP and for him it works just fine, while for me it wasn't, weird..
Here's small example of my suggestion regarding the listener and updates handling https://gist.github.com/UnAfraid/4d708e14ccfc5c4066df
Looks like an interesting addition, but I think people should decide for themselves on how to implement a listener or we should provide an additional dependency lib.
Don't know if you already found the issue, but here it is. https://github.com/FasterXML/jackson-datatype-jdk8/issues/6
Seems we're done with that, closing it, thanks!
Hello again,
I went into a bit more usage and i've notice that some fields that are Optional are set to null rather then Optional.of(null) / Optional.empty() For example
getUsername() returns null rather then Optional in this case.
I tried also sendPhoto method and it resulted in Bad Gateway, i sniffed the connection to check if all is okay and it seems like it matches against the specifications of the API i couldn't find what's wrong with it.
Also you may implement a little listener for getting updates and notify on it upon received new update.
Thanks!