aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-11-05 23:13:35 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2018-11-05 23:23:13 +0100
commit5070f4368fe5722ab72319ccc969b83de25047c0 (patch)
treea7196422c52ce014b7578fb87c6687c7d6ae5b0b
parentfd4ddd9b5351e3720d6ffb64e1b35ac36a21a69f (diff)
downloadwee-slack-5070f4368fe5722ab72319ccc969b83de25047c0.tar.gz
Support using /thread for already opened threads
Fixes #533
-rw-r--r--wee_slack.py5
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")