diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2018-11-05 23:13:35 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2018-11-05 23:23:13 +0100 |
commit | 5070f4368fe5722ab72319ccc969b83de25047c0 (patch) | |
tree | a7196422c52ce014b7578fb87c6687c7d6ae5b0b | |
parent | fd4ddd9b5351e3720d6ffb64e1b35ac36a21a69f (diff) | |
download | wee-slack-5070f4368fe5722ab72319ccc969b83de25047c0.tar.gz |
Support using /thread for already opened threads
Fixes #533
-rw-r--r-- | wee_slack.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index 5b1e744..90b0d8c 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2209,8 +2209,9 @@ class SlackMessage(object): return hash(self.ts) def open_thread(self, switch=False): - self.thread_channel = SlackThreadChannel(EVENTROUTER, self) - self.thread_channel.open() + if not self.thread_channel or not self.thread_channel.active: + self.thread_channel = SlackThreadChannel(EVENTROUTER, self) + self.thread_channel.open() if switch: w.buffer_set(self.thread_channel.channel_buffer, "display", "1") |