From 429dfedb0403a9ec51af171513b5b3d9fbe8f1a6 Mon Sep 17 00:00:00 2001 From: Wolf480pl Date: Wed, 22 Feb 2017 15:29:40 +0100 Subject: Set the thread channel's topic to the parent message --- wee_slack.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wee_slack.py b/wee_slack.py index 05f4785..a74dab4 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1565,6 +1565,10 @@ class SlackThreadChannel(object): w.buffer_set(self.channel_buffer, "localvar_set_type", 'channel') w.buffer_set(self.channel_buffer, "localvar_set_channel", self.formatted_name()) w.buffer_set(self.channel_buffer, "short_name", self.formatted_name(style="sidebar", enable_color=True)) + time_format = w.config_string(w.config_get("weechat.look.buffer_time_format")) + parent_time = time.localtime(SlackTS(self.parent_message.ts).major) + topic = '{} {} | {}'.format(time.strftime(time_format, parent_time), self.parent_message.sender, self.parent_message.render() ) + w.buffer_set(self.channel_buffer, "title", topic.encode('utf-8')) #self.eventrouter.weechat_controller.set_refresh_buffer_list(True) -- cgit