Skip to content

Commit ea8cf24

Browse files
committed
Merge pull request #152 from jacklul/fixgetme
fix getMe() exception
2 parents 452c344 + e75eec1 commit ea8cf24

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Entities/ServerResponse.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public function __construct(array $data, $bot_name)
3939
} elseif (isset($data['result']['file_id'])) {
4040
//Response getFile
4141
$this->result = new File($data['result']);
42+
} elseif (isset($data['result']['username'])) {
43+
//Response getMe
44+
$this->result = new User($data['result']);
4245
} else {
4346
//Response from sendMessage
4447
$this->result = new Message($data['result'], $bot_name);

0 commit comments

Comments
 (0)