aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2019-05-15 12:30:28 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2019-06-02 23:09:20 +0200
commit08b75e8dbf983ca0a5556ebf7867e6de02df452d (patch)
tree6d9cb56c4cefb3f03f68b5ea8cfcbe3fdc5f5285
parent490f72747ba1322ceeb98898bf519691e6a47bde (diff)
downloadwee-slack-08b75e8dbf983ca0a5556ebf7867e6de02df452d.tar.gz
Set nick tag for join, leave and topic messages
-rw-r--r--wee_slack.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py
index ee2dffd..3054e3e 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2844,7 +2844,7 @@ def subprocess_thread_message(message_json, eventrouter, channel, team):
def subprocess_channel_join(message_json, eventrouter, channel, team):
prefix_join = w.prefix("join").strip()
message = SlackMessage(message_json, team, channel, override_sender=prefix_join)
- channel.buffer_prnt(prefix_join, channel.render(message), message_json["ts"], tagset='join')
+ channel.buffer_prnt(prefix_join, channel.render(message), message_json["ts"], tagset='join', tag_nick=message.get_sender()[1])
channel.user_joined(message_json['user'])
channel.store_message(message, team)
@@ -2852,7 +2852,7 @@ def subprocess_channel_join(message_json, eventrouter, channel, team):
def subprocess_channel_leave(message_json, eventrouter, channel, team):
prefix_leave = w.prefix("quit").strip()
message = SlackMessage(message_json, team, channel, override_sender=prefix_leave)
- channel.buffer_prnt(prefix_leave, channel.render(message), message_json["ts"], tagset='leave')
+ channel.buffer_prnt(prefix_leave, channel.render(message), message_json["ts"], tagset='leave', tag_nick=message.get_sender()[1])
channel.user_left(message_json['user'])
channel.store_message(message, team)
@@ -2887,7 +2887,7 @@ def subprocess_message_deleted(message_json, eventrouter, channel, team):
def subprocess_channel_topic(message_json, eventrouter, channel, team):
prefix_topic = w.prefix("network").strip()
message = SlackMessage(message_json, team, channel, override_sender=prefix_topic)
- channel.buffer_prnt(prefix_topic, channel.render(message), message_json["ts"], tagset="topic")
+ channel.buffer_prnt(prefix_topic, channel.render(message), message_json["ts"], tagset="topic", tag_nick=message.get_sender()[1])
channel.set_topic(message_json["topic"])
channel.store_message(message, team)