aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wee_slack.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 3f30373..ece9716 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1445,10 +1445,15 @@ class SlackTeam(object):
self.buffer_prnt('Connected to Slack team {} ({}) with username {}'.format(
self.team_info["name"], self.domain, self.nick))
dbg("connected to {}".format(self.domain))
- if reconnect and config.background_load_all_history:
- for channel in self.channels.values():
- if channel.channel_buffer:
- channel.get_history(slow_queue=True)
+ if reconnect:
+ if config.background_load_all_history:
+ for channel in self.channels.values():
+ if channel.channel_buffer:
+ channel.get_history(slow_queue=True)
+ else:
+ current_channel = self.eventrouter.weechat_controller.buffers.get(w.current_buffer())
+ if isinstance(current_channel, SlackChannelCommon) and current_channel.team == self:
+ current_channel.get_history(slow_queue=True)
def set_disconnected(self):
w.unhook(self.hook)