aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-09-02 21:25:48 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2018-09-04 20:48:27 +0200
commit24ad703676fd03077d7b943f11a942e61da694e0 (patch)
tree2afe3f4bc3cbae1190eb2df0d6b5ea2ae9255757 /wee_slack.py
parentaa3490cf3682b872de7d2dfa988e12064a75ab1e (diff)
downloadwee-slack-24ad703676fd03077d7b943f11a942e61da694e0.tar.gz
Always call set_highlights in set_highlight_words
If highlight_words is set to nothing, we should still call set_highlights to remove any previous words.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 605456c..830d1cc 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1102,10 +1102,9 @@ class SlackTeam(object):
self.muted_channels = {x for x in muted_str.split(',') if x}
def set_highlight_words(self, highlight_str):
- self.highlight_words = {x for x in highlight_str.split(',')}
- if len(self.highlight_words) > 0:
- for v in self.channels.itervalues():
- v.set_highlights()
+ self.highlight_words = {x for x in highlight_str.split(',') if x}
+ for channel in self.channels.itervalues():
+ channel.set_highlights()
def formatted_name(self, **kwargs):
return self.domain