Please recheck documentation, i getting directly one object.
The function returns an array of Update objects.
https://telegram-bot-sdk.readme.io/docs/webhook-updates
True. I also stumbled upon that.
I'm voting for either
a) return a Update[] with a single Update in it to make it consistent with getUpdates()
or
b) rename it getWebhookUpdate, continue to return a single Update and update the docs
Sidenote:
With Powered by Laravel Collection API for Response Objects., why not do the same here and return a Collection of Updates?
Yeah, I'm aware of this.
It'll be renamed and the old method will be deprecated.
@sloothword Update object is already a collection and since it simply returns only 1 update, there is no point of returning a collection of them.
Most helpful comment
Fixed with https://github.com/irazasyed/telegram-bot-sdk/pull/222/commits/ed822b886abb7412b044f8f46019109e89db7e6b