-
-
Notifications
You must be signed in to change notification settings - Fork 963
Closed
Description
Responses from getChat are being mistakely handled by getMe condition:
if (isset($data['result']['total_count'])) {
//Response from getUserProfilePhotos
$this->result = new UserProfilePhotos($data['result']);
} elseif (isset($data['result']['file_id'])) {
//Response from getFile
$this->result = new File($data['result']);
} elseif (isset($data['result']['username'])) {
//Response from getMe
$this->result = new User($data['result']);
} elseif (isset($data['result']['id'])) {
//Response from getChat
$this->result = new Chat($data['result']);
} elseif (isset($data['result']['user'])) {
//Response from getChatMember
$this->result = new ChatMember($data['result']);
} else {
//Response from sendMessage
$this->result = new Message($data['result'], $bot_name);
}
should be changed to:
(...)
} elseif (isset($data['result']['title'])) {
//Response from getChat
$this->result = new Chat($data['result']);
} elseif (isset($data['result']['username'])) {
//Response from getMe
$this->result = new User($data['result']);
(...)
Metadata
Metadata
Assignees
Labels
No labels