diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2022-10-04 18:10:57 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2022-10-04 18:10:57 +0200 |
commit | a4e1c79d3bffa82628bcb91a4121ed5f7600d1e1 (patch) | |
tree | dd62602cb13407299eb84c9d8e253a8cb954af51 /wee_slack.py | |
parent | 0067ede3c2bcc654859a29b27961115f260266e7 (diff) | |
download | wee-slack-a4e1c79d3bffa82628bcb91a4121ed5f7600d1e1.tar.gz |
Open open IMs and MPIMs on start
We used the response from rtm.start to find which IMs and MPIMs to open,
but after moving away from that we didn't have the information from the
response from conversations.list, so commit 962bbc5 changed to only open
unread ones.
However, it turns out that conversations.info has the information, and
we are already requesting that for each IM/MPIM to check if it's unread,
so we can use that to open the correct ones.
Fixes #875
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 bc075d7..fd4eaba 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3801,6 +3801,8 @@ def handle_conversationsinfo(channel_json, eventrouter, team, channel, metadata) if unread_count and channel.channel_buffer is None: channel.create_buffer() channel.set_unread_count_display(unread_count) + if channel_info.get("is_open") and channel.channel_buffer is None: + channel.create_buffer() if "last_read" in channel_info: channel.last_read = SlackTS(channel_info["last_read"]) if "members" in channel_info: |