diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-11-17 20:24:00 +0000 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-11-17 20:24:00 +0000 |
commit | df15f2f4973059008dc816f78df939d18826b699 (patch) | |
tree | 9a057fc8ce9c0a9d7650f008827a6a21e65cfbee /wee_slack.py | |
parent | 585b7ca28ea9424c0e894af7cc216ae8afdb2192 (diff) | |
download | wee-slack-df15f2f4973059008dc816f78df939d18826b699.tar.gz |
open im chats if they have unread messages
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index 7198ba3..e4edc2c 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -295,6 +295,8 @@ class SlackServer(object): for item in data["ims"]: if "last_read" not in item: item["last_read"] = 0 + if item["unread_count"] > 0: + item["is_open"] = True name = self.users.find(item["user"]).name self.add_channel(DmChannel(self, name, item["id"], item["is_open"], item["last_read"])) for item in data['self']['prefs']['muted_channels'].split(','): |