From d6252f0c422d95a1d2b750f626a547b77ef43112 Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Thu, 2 Oct 2014 12:40:59 -0700 Subject: fixed use of len --- wee_slack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index e73f9c0..a2178be 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -25,7 +25,7 @@ class Typing: self.dms = {} def add(self, channel, user): if channel.startswith(DIRECT_MESSAGE): - self.dms[len(DIRECT_MESSAGE):] = time.time() + self.dms[channel[len(DIRECT_MESSAGE):]] = time.time() else: self.channels.setdefault(channel, {}) self.channels[channel][user] = time.time() @@ -209,7 +209,7 @@ def process_channel_marked(message_json): def process_im_marked(message_json): channel = message_json["channel"] - buffer_name = "%s.%s" % (server, channel[len(DIRECT_MESSAGE)]) + buffer_name = "%s.%s" % (server, channel[len(DIRECT_MESSAGE):]) if buffer_name != current_buffer_name(): buf_ptr = w.buffer_search("",buffer_name) w.buffer_set(buf_ptr, "unread", "") -- cgit