Improved spacing on towel roller printouts

This commit is contained in:
Jacob Henry 2018-09-18 16:36:11 -04:00
parent 8aa2b9264c
commit 0bb05b406b
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,9 @@ def reply(slack, msg, text, in_thread=True, to_channel=None):
# Send in a thread by default # Send in a thread by default
if in_thread: if in_thread:
slack.rtm_send_message(channel=to_channel, message=text, thread=msg['ts']) thread = (msg.get("thread_ts") # In-thread case - get parent ts
or msg.get("ts")) # Not in-thread case - get msg itself ts
slack.rtm_send_message(channel=to_channel, message=text, thread=thread)
else: else:
slack.rtm_send_message(channel=to_channel, message=text) slack.rtm_send_message(channel=to_channel, message=text)