reverts a tiny change from dbc2cd7f6, we need to check both fields because:
- m.OriginalChat is nil when message is not forwarded from a channel
- m.OriginalSender can be nil if the message is forwarded from a channel
(doc: https://core.telegram.org/bots/api#message)
IMO, we shouldn't be introducing distinct EditText/EditMarkup
methods because it just doesn't make sense, you can do both in
one and EditCaption is a pretty odd case so we live it be.
- Callback structs has been moved to callbacks.go
- User / Chat and its methods -> chat.go
- Concept of Editable and Message Signature introduced
- No more types.go, it's been refactored into media.go + friends
This commit refactors lots of duplicated code from bot.go, so
instead of having N redundant SendX methods, now it's the
responsibility of all Sendable objects to implement Send(..)
instead. Impl in types_send.go, 150 LOC only!
This is a breaking change! Reducing memory usage from 1544 bytes
down to 504 bytes on 64-bit system. Considering Message is the
most used Telebot type, it's a pretty big deal.
Also, now we finally can test optional fields against nil!
This would fix the problem that forwarded messages from channels don't get detected as forwarded and allows you to get the chat id of the channel the message was originally posted to.