-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from southbridgeio/develop
Develop
- Loading branch information
Showing
59 changed files
with
447 additions
and
1,105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,21 +28,6 @@ Telegram support includes: | |
* Common client commands that utilize [tdlib-ruby](https://github.com/centosadmin/tdlib-ruby) | ||
* [Telegram Login](https://core.telegram.org/widgets/login) to connect Redmine and Telegram accounts | ||
|
||
|
||
### Proxy | ||
|
||
You can set proxy pool on plugin settings page. Proxies are gonna be monitored for availability, and first working proxy will be taken for every request. | ||
|
||
Proxy format is same to curl: | ||
|
||
```bash | ||
http://user:[email protected]:3128 | ||
socks5://user:[email protected]:9050 | ||
``` | ||
|
||
Only SOCKS5 and HTTP proxies are supported. | ||
Note that tdlib supports only SOCKS5 proxies, so you should add at least one SOCKS5 proxy if you want tdlib to be proxied. | ||
|
||
### Tdlib | ||
In order to use tdlib client you need compiled [TDLib](https://github.com/tdlib/td). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1 @@ | ||
<script async src="https://telegram.org/js/telegram-widget.js?4" data-telegram-login="<%= Setting.plugin_redmine_bots['telegram_bot_name'] %>" data-size="large" data-auth-url="<%= Setting.protocol %>://<%= Setting.host_name %>/telegram/check_auth?<%= params.to_unsafe_h.slice(:autologin, :back_url).merge(context: context).to_query %>" data-request-access="write"></script> | ||
<% current_user = @user || User.current %> | ||
<% telegram_account = | ||
case context | ||
when 'account_connection' | ||
current_user.telegram_account | ||
when '2fa_connection' | ||
current_user.telegram_connection | ||
end | ||
%> | ||
<br> | ||
|
||
<% if current_user.logged? && telegram_account.present? %> | ||
<%= link_to send_telegram_sign_in_link_path(params.to_unsafe_h.slice(:autologin, :back_url)), method: :post, remote: true do %> | ||
<%= t('redmine_bots.telegram.bot.login.send_to_telegram') %> | ||
<% end %> (<%= t('redmine_bots.telegram.bot.login.widget_not_visible') %>) | ||
<% else %> | ||
<%= t('redmine_bots.telegram.bot.login.write_to_bot', bot: Setting.plugin_redmine_bots['telegram_bot_name']) %> | ||
<% end %> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class AsyncBotHandlerWorker | ||
include Sidekiq::Worker | ||
|
||
sidekiq_options queue: :telegram | ||
|
||
def perform(method, args) | ||
RedmineBots::Telegram.set_locale | ||
|
||
RedmineBots::Telegram.bot.send(method, **args.symbolize_keys) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.