botman / driver-telegram

BotMan Telegram Driver
MIT License
86 stars 75 forks source link

Don't set from in default message in build payload of TelegramDriver #86

Closed vdomah closed 4 years ago

vdomah commented 4 years ago

H! I'm trying to implement new TelegramInlineQueryDriver. And I'm facing the issue when the main TelegramDriver matches the inline query request when it shouldn't.

That happens in the TelegramDriver::matchesRequest but the cause is not there. The problem is because in buildPayload method the empty from attribute is added to the $message array

$message['from'] = ['id' => 0];

So removing that line will allow to match only TelegramInlineQueryDriver without touching main TelegramDriver.