Skip to content

Commit ba6cb0f

Browse files
committed
more stability if there is no status key
1 parent 62c38a2 commit ba6cb0f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Entities/ChatMember/Factory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ class Factory extends \Longman\TelegramBot\Entities\Factory
1111
{
1212
public function make(array $data, string $bot_username): Entity
1313
{
14-
$status = $data['status'];
15-
switch ($status) {
14+
switch ($data['status'] ?? '') {
1615
case 'creator':
1716
return new ChatMemberOwner($data, $bot_username);
1817
case 'administrator':

0 commit comments

Comments
 (0)