aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-08-23 23:24:01 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2018-08-23 23:24:01 +0200
commitcf9fdcf5fb40fc1acbc4efc85ad187e44087b0a1 (patch)
tree6b99e3ba8190df91852a967bc83330fe096a3b26 /wee_slack.py
parent1bbfd244ef9177dbcd2ea6600869e85e18d0f85a (diff)
downloadwee-slack-cf9fdcf5fb40fc1acbc4efc85ad187e44087b0a1.tar.gz
Don't print whitespace before join/leave messages
The join/leave prefix ends with a tab (which is used to separate nick and message), but we also add a tab in buffer_prnt, so the join/leave messages ended up with a tab in front of them.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 7126fcd..1400354 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2560,14 +2560,14 @@ def subprocess_thread_message(message_json, eventrouter, channel, team):
def subprocess_channel_join(message_json, eventrouter, channel, team):
- joinprefix = w.prefix("join")
+ joinprefix = w.prefix("join").strip()
message = SlackMessage(message_json, team, channel, override_sender=joinprefix)
channel.buffer_prnt(joinprefix, message.render(), message_json["ts"], tagset='joinleave')
channel.user_joined(message_json['user'])
def subprocess_channel_leave(message_json, eventrouter, channel, team):
- leaveprefix = w.prefix("quit")
+ leaveprefix = w.prefix("quit").strip()
message = SlackMessage(message_json, team, channel, override_sender=leaveprefix)
channel.buffer_prnt(leaveprefix, message.render(), message_json["ts"], tagset='joinleave')
channel.user_left(message_json['user'])