aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorPaul B <paul.bonaud@capitainetrain.com>2018-08-30 10:14:19 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2018-10-21 21:29:01 +0200
commitb53e08f5ad9141afc93a8a44756010a905304bac (patch)
treebe88750dc2ee63066dbaaca28e0cbefe8939d5af /wee_slack.py
parent2e4ce42b2bc51b15e643b9063e54c720e779059f (diff)
downloadwee-slack-b53e08f5ad9141afc93a8a44756010a905304bac.tar.gz
reactions: Add a config parameter to change color of suffixed reacs
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 17fbceb..0e8ccb4 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3064,9 +3064,10 @@ def create_reaction_string(reactions):
count = 0
if not isinstance(reactions, list):
reaction_string = " {}[{}]{}".format(
- w.color("darkgray"), reactions, w.color("reset"))
+ w.color(config.reaction_suffix_color), reactions, w.color("reset"))
+
else:
- reaction_string = ' {}['.format(w.color("darkgray"))
+ reaction_string = ' {}['.format(w.color(config.reaction_suffix_color))
for r in reactions:
if len(r["users"]) > 0:
count += 1
@@ -3908,6 +3909,10 @@ class PluginConfig(object):
'never_away': Setting(
default='false',
desc='Poke Slack every five minutes so that it never marks you "away".'),
+ 'reaction_suffix_color': Setting(
+ default='darkgray',
+ desc='Color to use for the [:wave:(@user)] suffix on messages that'
+ ' have reactions attached to them.'),
'record_events': Setting(
default='false',
desc='Log all traffic from Slack to disk as JSON.'),
@@ -4037,6 +4042,7 @@ class PluginConfig(object):
get_group_name_prefix = get_string
get_map_underline_to = get_string
get_muted_channels_activity = get_string
+ get_reaction_suffix_color = get_string
get_render_bold_as = get_string
get_render_italic_as = get_string
get_shared_name_prefix = get_string