PoetOS / moodle-message_output_telegram

A Telegram message output plugin for Moodle.
6 stars 5 forks source link

Allow the user to enter their username or phone number, instead of chatid #2

Closed xow closed 7 years ago

xow commented 7 years ago

This could be done by requesting the chat id for a username or phonenumber from the telegram api

mchurchward commented 7 years ago

Can you point me to the documentation for this API?

xow commented 7 years ago

We could ask the user to share their contact with the bot, then call getUpdates, then search the result for their username or phone number. This would be a fair amount of work so is a nice to have. Not necessary for inclusion in the DB, but would improve user experience a lot.

mchurchward commented 7 years ago

Version 3.2.4 adds a better user experience. The user just needs to click a link to open the bot and press "Start". Moodle will look for their session id to match the account to the Telegram user, and then grab the chatid from there.