go-telegram / bot

Telegram Bot API Go framework
MIT License
507 stars 46 forks source link

Set IsAnonymous poll param to pointer #26

Closed srgustafson8 closed 1 year ago

srgustafson8 commented 1 year ago

Sets the type of SendPollParams.IsAnonymous to a pointer to a boolean to address the case where setting the value to false (I want a non-anonymous poll) would omit the value, leading to the default of true being selected.

This does mean it's now slightly more awkward to define - have to pass a pointer to a bool value now rather than just a normal bool, but it does fix the issue. Open to suggestions for better approaches if you have any.

Test Results:

❯ go test
PASS
ok      github.com/go-telegram/bot      0.864s

Closes #25