Skip to content

Commit

Permalink
Open open IMs and MPIMs on start
Browse files Browse the repository at this point in the history
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
  • Loading branch information
trygveaa committed Oct 4, 2022
1 parent 0067ede commit a4e1c79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wee_slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a4e1c79

Please sign in to comment.