This plugin provides common stuff to build redmine plugins that involve Slack/Telegram API usage.
From 0.3.0 proxy settings are unified for tdlib and bot and there is support for multiple proxies. If you have used proxies before, you should reassign it on plugin settings page.
Webhook URL is changed in 0.2.0 because of webhook secret. You need to reinitialize webhook from plugin settings page.
Telegram support includes:
In order to use tdlib client you need compiled TDLib.
It should be placed it in redmine_root/vendor
or added to ldconfig.
For CentOS you can use our repositories:
http://rpms.southbridge.ru/rhel7/stable/x86_64/
http://rpms.southbridge.ru/rhel6/stable/x86_64/
And also SRPMS:
http://rpms.southbridge.ru/rhel7/stable/SRPMS/
http://rpms.southbridge.ru/rhel6/stable/SRPMS/
To make telegram client working you should follow steps:
IMPORTANT: 2FA is not supported at the moment
It is necessary to register a bot and get its token.
There is a @BotFather bot used in Telegram for this purpose.
Type /start
to get a complete list of available commands.
Type /newbot
command to register a new bot.
@BotFather will ask you to name the new bot. The bot's name must end with the "bot" word.
On success @BotFather will give you a token for your new bot and a link so you could quickly add the bot to the contact list.
You'll have to come up with a new name if registration fails.
Set the Privacy mode to disabled with /setprivacy
. This will let the bot listen to all group chats and write its logs to Redmine chat archive.
Set bot domain with /setdomain
for account connection via Telegram Login. Otherwise, you will receive Bot domain invalid
error on account connection page.
Enter the bot's token on the Plugin Settings page to add the bot to your chat.
To add hints for commands for the bot, use command /setcommands
. You need to send list of commands with descriptions. You can get this list from command /help
.
Bot should be added to contacts of account used to authorize telegram client in plugin.
Bot can work in two modes — getUpdates or WebHooks.
To work via getUpdates, you should run bot process bundle exec rake redmine_bots:telegram
.
This will drop bot WebHook setting.
To work via WebHooks, you should go to plugin settings and press button "Initialize bot" (bot token should be saved earlier, and notice that redmine should work on https)
Slack support includes:
In order to use Slack integrations you need to follow these steps:
Create your own Slack app here.
Go to your app page (you can view the list of all your apps here) and copy data from App Credentials block to plugin settings.
Create bot user on Bot users page.
Obtain your oauth tokens on OAuth & Permissions page and copy it to plugin settings.
Add redirect url for Sign in with Slack: https://your.redmine.host/slack/sign_in/check
Configure app scopes on demand.
Run bot with bundle exec rake redmine_bots:slack
You can transparently migrate your old data (telegram accounts, settings and tdlib db/files) to new DB structure if you used redmine_telegram_common before with bundle exec rake redmine_bots:migrate_from_telegram_common
.
The plugin is designed by Southbridge