aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2014-10-02 12:40:59 -0700
committerRyan Huber <rhuber@gmail.com>2014-10-02 12:40:59 -0700
commitd6252f0c422d95a1d2b750f626a547b77ef43112 (patch)
tree38d00a652f61e7834d79d1843512f41df27d5813
parent1f0bb2ab9751e48276f7f2679389c9403f749a83 (diff)
downloadwee-slack-d6252f0c422d95a1d2b750f626a547b77ef43112.tar.gz
fixed use of len
-rw-r--r--wee_slack.py4
1 files changed, 2 insertions, 2 deletions
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", "")