diff --git a/help/en/telegram.myco b/help/en/telegram.myco new file mode 100644 index 0000000..e396b51 --- /dev/null +++ b/help/en/telegram.myco @@ -0,0 +1,39 @@ +# Telegram authorization +//This article is intended for wiki administrators.// + +If you want, you can let users log in to your wiki using **Telegram**. + +Telegram is a proprietary messaging application used by half a billion people. Learn more at [[https://telegram.org]]. + +## Setting up Telegram integration +In order to enable Telegram authorization, you need to create a Telegram bot and link it with your wiki. + +### Creating a bot +Open the chat with [[https://t.me/botfather | @BotFather]], the bot for creating other bots. Create a new bot there. You will need the bot username and token later. You can set the bot's userpic. It would be great if it matches your wiki's logo. + +After creating the bot, send the `/setdomain` command and then send your wiki's domain. + +You do not need to actually //host// the bot. It is enough for it just to be created in BotFather. You can also reuse a previously existing bot. + +### Configuring +In `config.ini`, in `[Telegram]` section, fill in the bot's username (without @) and token: + +``` +[Telegram] +TelegramBotName = your_bot +TelegramBotToken = 0000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +``` + +Reload the wiki. + +If both fields are both set, the engine will enable Telegram authorization. + +## Using +On login and register pages there is a blue button. If a user clicks it, they are prompted to give the authorization permission to your bot. The user's @username will be used as wiki username. Telegram users are part of the //editor// user group by default. Telegram users can use the wiki just like everyone else. + +## Limitations +* Telegram does not support HTTP wikis, you //must// use HTTPS. +** One way of setting up HTTPS is using [[https://certbot.eff.org | certbot]] and a reverse proxy such as [[https://nginx.org | nginx]]. +* Telegram users without @username cannot authorize. +* Telegram users with usernames that are already taken on the wiki cannot authorize. +* Overall, this is an experimental feature. Use on your own risk. diff --git a/help/en/whitelist.myco b/help/en/whitelist.myco index 7190d7e..8f5258f 100644 --- a/help/en/whitelist.myco +++ b/help/en/whitelist.myco @@ -1,4 +1,6 @@ # Whitelist +//This article is intended for wiki administrators.// + If you want to limit what people can authorize to your wiki, you may want to use the **whitelist**. In `config.ini`, in the `[Authorization]` section, enable the white list in `UseWhiteList` and list all allowed usernames in the `WhiteList` field separated by comma: diff --git a/views/stuff.qtpl b/views/stuff.qtpl index 84be5d1..94bbd0e 100644 --- a/views/stuff.qtpl +++ b/views/stuff.qtpl @@ -141,23 +141,16 @@ It outputs a poorly formatted JSON, but it works and is valid.