DJTommek / better-location

Telegram bot for parsing and generating various of location formats.
https://t.me/BetterLocationBot
MIT License
7 stars 2 forks source link

Refreshable location #48

Closed DJTommek closed 3 years ago

DJTommek commented 3 years ago

Add support for refreshable locations. If some location can return different location on same input, it's marked as refreshable. If refreshable location is available in collection, better message will have two extra buttons. One for manual refresh, second for enabling / disabling autorefresh. If autorefresh enabled, user do not have to do anything, and whole better message will be autorefreshed automatically for him. For autorefresh there is separate page dedicated for CRON scripts which will handle that.

Also rewritten TelegramCustomWrapper to be able inicialize event based on JSON input (like that in webhook) without starting real handle (ie. send new message). That was necessary to be able recognize proper event based on JSON saved in database. Instead of sending new message it will just tell what type of message it is and then update previously send message.