diff options
author | Ryan Huber <rhuber@gmail.com> | 2017-02-04 20:20:41 -0800 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2017-02-04 20:20:41 -0800 |
commit | a110414a4f0e667a2148c2991eb7730df3a61f08 (patch) | |
tree | a3d38e7fb178790998cd63a89a9053f738cc00e5 | |
parent | 614751f3fb9d4e69390ed8faf118459ef2149655 (diff) | |
download | wee-slack-a110414a4f0e667a2148c2991eb7730df3a61f08.tar.gz |
default diff color for thread suffix
-rw-r--r-- | wee_slack.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 6726244..51fe1be 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1298,7 +1298,7 @@ class SlackMessage(object): return hash(self.ts) def render(self, force=False): if len(self.submessages) > 0: - return "{} {} {}".format(render(self.message_json, self.team, self.channel, force), self.suffix, "[Thread: {}]".format(self.ts)) + return "{} {} {}".format(render(self.message_json, self.team, self.channel, force), self.suffix, "{}[ Thread: {} Replies: {} ]".format(w.color(config.thread_suffix_color), self.ts, len(self.submessages))) return "{} {}".format(render(self.message_json, self.team, self.channel, force), self.suffix) def change_text(self, new_text): self.message_json["text"] = new_text @@ -2175,6 +2175,7 @@ class PluginConfig(object): 'unfurl_ignore_alt_text': 'false', 'cache_messages': 'true', 'record_events': 'false', + 'thread_suffix_color': 'lightcyan', } # Set missing settings to their defaults. Load non-missing settings from @@ -2222,6 +2223,9 @@ class PluginConfig(object): else: return token + def get_thread_suffix_color(self, key): + return w.config_get_plugin("thread_suffix_color") + def get_slack_timeout(self, key): return int(w.config_get_plugin(key)) |