Create chat-based plugin system to allow edit message after it is processed by BetterLocation services but before sending into Telegram chats.
Real example
Goal
Bot is in chat named Berlin and users want to see warning, if distance to Berlin is too big for all locations.
How to do it
When someone sends message, where location is detected, eg link https://www.waze.com/ul?ll=50.087451,14.420671, bot will parse it, discovers that it is WazeService and extract coordinates.
Then will call API URL (set by admin of chat Berlin in settings) with basic information about all detected locations (location coordinates, generated prefix, ...) as parameter. External server can:
respond that he don't want to edit message in any way (for example location is inside area of Berlin)
update provided locations by updating message prefix from default 'Waze' to custom 'Waze ⚠️ (280 km away)'
Notes
Only chat admins should be allowed to see and edit plugin API URLs
Server should respond quickly, within few seconds.
For start
send only very basic information (list of locations with coordinates and text prefix)
Create chat-based plugin system to allow edit message after it is processed by BetterLocation services but before sending into Telegram chats.
Real example
Goal
Bot is in chat named Berlin and users want to see warning, if distance to Berlin is too big for all locations.
How to do it
When someone sends message, where location is detected, eg link https://www.waze.com/ul?ll=50.087451,14.420671, bot will parse it, discovers that it is WazeService and extract coordinates.
Then will call API URL (set by admin of chat Berlin in settings) with basic information about all detected locations (location coordinates, generated prefix, ...) as parameter. External server can:
Notes