aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-08-25 18:55:38 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2018-08-25 19:56:56 +0200
commit44a72f2bb49b5b322f24b88c2128e19674ae4b76 (patch)
treeb0404d6397fe400745901769c73850e78d602f5e
parentdde59ccbcdbeedace0ecd91577ceebcdf05b8c0e (diff)
downloadwee-slack-44a72f2bb49b5b322f24b88c2128e19674ae4b76.tar.gz
Use highlight notifications for MPDMs
DMs with multiple persons should highlight just like DMs with one person, instead of notifying without highlight like a channel. This seems to have been the intention all along, but it didn't work because the channel type was checked for mpdm, not mpim which is what the type is set to (even though the class is called SlackMPDMChannel.
-rw-r--r--wee_slack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index dd5f39e..25132df 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1300,7 +1300,7 @@ class SlackChannel(object):
self.unread_count_display = count
self.new_messages = bool(self.unread_count_display)
for c in range(self.unread_count_display):
- if self.type == "im":
+ if self.type in ["im", "mpim"]:
w.buffer_set(self.channel_buffer, "hotlist", "2")
else:
w.buffer_set(self.channel_buffer, "hotlist", "1")
@@ -1445,7 +1445,7 @@ class SlackChannel(object):
# we have to infer the tagset because we weren't told
elif ts <= last_read:
tags = tag("backlog", user=tag_nick)
- elif self.type in ["im", "mpdm"]:
+ elif self.type in ["im", "mpim"]:
if tag_nick != self.team.nick:
tags = tag("dm", user=tag_nick)
self.new_messages = True