Feature #3170
openHomework 3: Gatekeeper bot
0%
Description
Make your bot into a gatekeeper.
It has to listen for chat_join_request events, and handle them with canonical Qbix style. Just add the handlers inside the Telegram/handlers and name them appropriately.
The default handler, it check Q_Config::get('Telegram', 'bot', 'messages', 'chatJoinRequest', null) and if it exists, it will be fed to Q::text(). Typically it would be ["Telegram/content", ["chatJoinRequest", "Welcome"]] and that will mean open that en.json file and use that path.
If it is not null, then the bot will a chat to the user (using the private chat id) and send some welcome message by just calling Q::text($params).
In Telegram plugin, implement the approveChatJoinRequest method of Telegram_Bot
In the app, when the user answers, you can call this approveChatJoinRequest (in the app handler, not Telegram plugin)
Telegram plugin must have generic code. App handler can override / handle some events.