We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6aae4a commit c5c2abbCopy full SHA for c5c2abb
src/Entities/ChatMember/Factory.php
@@ -11,10 +11,6 @@ class Factory extends \Longman\TelegramBot\Entities\Factory
11
{
12
public function make(array $data, string $bot_username): Entity
13
14
- if (! isset($data['status'])) {
15
- throw new TelegramException('Missing ChatMember status');
16
- }
17
-
18
$type = [
19
'creator' => ChatMemberOwner::class,
20
'administrator' => ChatMemberAdministrator::class,
@@ -24,7 +20,7 @@ public function make(array $data, string $bot_username): Entity
24
'kicked' => ChatMemberBanned::class,
25
21
];
26
22
27
- if (! isset($type[$data['status']])) {
23
+ if (! isset($type[$data['status'] ?? ''])) {
28
return new ChatMemberNotImplemented($data, $bot_username);
29
}
30
0 commit comments