botman / botman/driver-telegram

Why extra call to API for getUser()?

Open
#76 1 comment 0 reactions 0 assignees View on GitHub
enhancement question
Dominant language
PHP
Stars
94
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Method `getUser()` in TelegramDriver issue `getChatMember` telegram API call. Why fire 'expensive' by time API call while Telegram provides `from` entry in each call which is enought in most cases?

"from": {
"id": 000000,
"is_bot": false,
"first_name": "fname",
"last_name": "lname",
"username": "username",
"language_code": "en"
},

I think it must extract that information and may be implement in `BotMan\Drivers\Telegram\Extensions\User` getters for additional data, provided by `getChatMember` and call API only if one of additional fields is requested

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.