Open yarkm13 opened 4 years ago
Because the from
is an optional param. It's empty when the message comes from a channel.
As I see the driver only uses the 'user' entry of the getChatMember
result what's the same User
object as the message's from
entry, so yes it would be an enchancement in the driver if someone adds this functionality.
Method
getUser()
in TelegramDriver issuegetChatMember
telegram API call. Why fire 'expensive' by time API call while Telegram providesfrom
entry in each call which is enought in most cases?I think it must extract that information and may be implement in
BotMan\Drivers\Telegram\Extensions\User
getters for additional data, provided bygetChatMember
and call API only if one of additional fields is requested