aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2017-02-06 15:58:02 -0800
committerRyan Huber <rhuber@gmail.com>2017-02-06 15:58:02 -0800
commit7b6467ee87d6730a12f951deaa5fb5319a83f54a (patch)
treec8d90299785ed6de1bb5e9395077a3677b5bf11b
parentd25d610e965be6eb9775f7b2daa0f85c0e794f1d (diff)
downloadwee-slack-7b6467ee87d6730a12f951deaa5fb5319a83f54a.tar.gz
fix tags
-rw-r--r--wee_slack.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py
index dc6e252..44cc015 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1068,8 +1068,11 @@ class SlackChannel(object):
elif ts <= SlackTS(self.last_read):
tags = tag("backlog")
elif self.type in ["im", "mpdm"]:
- tags = tag("dm")
- self.new_messages = True
+ if nick != self.team.nick:
+ tags = tag("dm")
+ self.new_messages = True
+ else:
+ tags = tag("dmfromme")
else:
tags = tag("default")
self.new_messages = True
@@ -2282,11 +2285,12 @@ def tag(tagset, user="unknown user"):
"highlightme": "notify_highlight,log1",
#when receiving a direct message
"dm": "notify_private,notify_message,log1,irc_privmsg",
+ "dmfromme": "notify_none,log1,irc_privmsg",
#when this is a join/leave, attach for smart filter ala:
#if user in [x.strip() for x in w.prefix("join"), w.prefix("quit")]
"joinleave": "irc_smart_filter",
#catchall ?
- "default": "notify_message,log1,irc_privmsg",
+ "default": "notify_message,log1",
}
return default_tag + "," + tagsets[tagset]