aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-04-20 11:19:28 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2020-05-30 21:13:20 +0200
commit931fc77d4b4af18f92300064f146973f0af58972 (patch)
treeeebd2609f1edba8295087cabad863970ea7cc3b1 /wee_slack.py
parentcd888c25a46344d46e275e5fb43ea5f590f5f50b (diff)
downloadwee-slack-931fc77d4b4af18f92300064f146973f0af58972.tar.gz
Rerender messages when running /rehistory
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 09592a0..68683f2 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1501,8 +1501,8 @@ class SlackTeam(object):
class SlackChannelCommon(object):
- def prnt_message(self, message, history_message=False, no_log=False):
- text = self.render(message)
+ def prnt_message(self, message, history_message=False, no_log=False, force_render=False):
+ text = self.render(message, force_render)
thread_channel = isinstance(self, SlackThreadChannel)
if message.subtype == "join":
@@ -1889,10 +1889,10 @@ class SlackChannel(SlackChannelCommon):
s = SlackRequest(self.team, join_method, {"users": self.user, "return_im": True}, channel=self)
self.eventrouter.receive(s)
- def reprint_messages(self, history_message=False, no_log=True):
+ def reprint_messages(self, history_message=False, no_log=True, force_render=False):
w.buffer_clear(self.channel_buffer)
for message in self.messages.values():
- self.prnt_message(message, history_message, no_log)
+ self.prnt_message(message, history_message, no_log, force_render)
def clear_messages(self):
w.buffer_clear(self.channel_buffer)
@@ -2393,13 +2393,13 @@ class SlackThreadChannel(SlackChannelCommon):
self.parent_message.sender, self.render(self.parent_message))
w.buffer_set(self.channel_buffer, "title", topic)
- def print_messages(self, history_message=False, no_log=False):
+ def print_messages(self, history_message=False, no_log=False, force_render=False):
for message in chain([self.parent_message], self.parent_message.submessages):
- self.prnt_message(message, history_message, no_log)
+ self.prnt_message(message, history_message, no_log, force_render)
- def reprint_messages(self, history_message=False, no_log=True):
+ def reprint_messages(self, history_message=False, no_log=True, force_render=False):
w.buffer_clear(self.channel_buffer)
- self.print_messages(history_message, no_log)
+ self.print_messages(history_message, no_log, force_render)
def destroy_buffer(self, update_remote):
self.channel_buffer = None
@@ -4366,7 +4366,7 @@ def command_rehistory(data, current_buffer, args):
if args == "-remote":
channel.get_history(full=True, no_log=True)
else:
- channel.reprint_messages()
+ channel.reprint_messages(force_render=True)
return w.WEECHAT_RC_OK_EAT
command_rehistory.completion = '-remote'