aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorJohn Anderson <sontek@gmail.com>2014-11-04 13:50:22 -0800
committerJohn Anderson <sontek@gmail.com>2014-11-04 13:50:22 -0800
commit0f4957a56942f60abab35834ac90c8db526717b9 (patch)
tree5b669ac1df5f52d66beef1d2dd33d5c4f828aa39 /wee_slack.py
parent105358e87310dd5b23e53a26208d708584dd421e (diff)
downloadwee-slack-0f4957a56942f60abab35834ac90c8db526717b9.tar.gz
Add the ability to use ${sec.data.slack_token} for configuration
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 219599f..585d606 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1119,6 +1119,10 @@ def create_slack_debug_buffer():
def config_changed_cb(data, option, value):
global slack_api_token, channels_always_marked_read, channels_not_on_current_server_color, colorize_nicks, slack_debug, debug_mode
slack_api_token = w.config_get_plugin("slack_api_token")
+
+ if slack_api_token.startswith('${sec.data'):
+ slack_api_token = w.string_eval_expression(slack_api_token, {}, {}, {})
+
channels_always_marked_read = [x.strip() for x in w.config_get_plugin("channels_always_marked_read").split(',')]
channels_not_on_current_server_color = w.config_get_plugin("channels_not_on_current_server_color")
if channels_not_on_current_server_color == "0":