Skip to content

Commit 00f719a

Browse files
committed
update isAdmin()
1 parent 61d6c75 commit 00f719a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Telegram.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,12 @@ public function isAdmin($user_id = null)
568568
if ($user_id === null && $this->update !== null) {
569569
if (($message = $this->update->getMessage()) && ($from = $message->getFrom())) {
570570
$user_id = $from->getId();
571+
} elseif (($inline_query = $this->update->getInlineQuery()) && ($from = $inline_query->getFrom())) {
572+
$user_id = $from->getId();
573+
} elseif (($callback_query = $this->update->getCallbackQuery()) && ($from = $callback_query->getFrom())) {
574+
$user_id = $from->getId();
575+
} elseif (($chosen_inline_result = $this->update->getChosenInlineResult()) && ($from = $chosen_inline_result->getFrom())) {
576+
$user_id = $from->getId();
571577
}
572578
}
573579

0 commit comments

Comments
 (0)