aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2019-04-05 15:01:45 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2019-06-02 23:02:07 +0200
commitd0f7c1e642c8f8e6dc60284481f2502edc1041d0 (patch)
treee9134fd7bea88343b947272c69e229a76380ce7c
parenta1359ca7e7286d87b8393ba4782fc79131e6976a (diff)
downloadwee-slack-d0f7c1e642c8f8e6dc60284481f2502edc1041d0.tar.gz
Set dm tags on threads in dms
-rw-r--r--wee_slack.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/wee_slack.py b/wee_slack.py
index bceb1ef..5a89232 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2121,17 +2121,12 @@ class SlackThreadChannel(SlackChannelCommon):
self.last_line_from = nick
ts = SlackTS(timestamp)
if self.channel_buffer:
- # backlog messages - we will update the read marker as we print these
- # backlog = False
- # if ts <= SlackTS(self.last_read):
- # tags = tag("backlog")
- # backlog = True
- # elif self.type in ["im", "mpdm"]:
- # tags = tag("dm")
- # self.new_messages = True
- # else:
- tags = tag("default", user=tag_nick)
- # self.new_messages = True
+ if self.parent_message.channel.type in ["im", "mpim"]:
+ tagset = "dm"
+ else:
+ tagset = "default"
+ tags = tag(tagset, user=tag_nick)
+
w.prnt_date_tags(self.channel_buffer, ts.major, tags, data)
modify_last_print_time(self.channel_buffer, ts.minor)
if tag_nick == self.team.nick: