From 10aea3c59ca1852c333087aa2a33ef08af74d473 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sat, 23 May 2020 01:06:10 +0200 Subject: Don't call buffer_clear on destroy_buffer When destroy_buffer is called, the buffer will be closed, so there isn't any point in clearing it. --- wee_slack.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index fc179fd..f7d3436 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1912,13 +1912,9 @@ class SlackChannel(SlackChannelCommon): s = SlackRequest(self.team, join_method, {"users": self.user, "return_im": True}, channel=self) self.eventrouter.receive(s) - def clear_messages(self): - w.buffer_clear(self.channel_buffer) + def destroy_buffer(self, update_remote): self.messages = OrderedDict() self.got_history = False - - def destroy_buffer(self, update_remote): - self.clear_messages() self.channel_buffer = None self.active = False if update_remote and not self.eventrouter.shutting_down: -- cgit