I'm creating a Python script to send messages to a slack channel. The message itself gets delivered fine, however when I try to start a thread and send replies to the thread, I am unable to get it working. The thread replies appear as a new parent message.
I'm using the slack-python-webhook module found at https://github.com/satoshi03/slack-python-webhook
import slackweb
import json
slack = slackweb.Slack(
url="https://hooks.slack.com/services/XXXX/XXXX/XXXXXX")
attachment = [{"text": "This is TEXT",
"ts": "1564629129"
}]
print(json.dumps(attachment))
slack.notify(attachments=attachment)
attachment = [{"text": "This is Thread REPLY",
"thread_ts": "1564629129",
"thread_ts": "1564629130"
}]
print(json.dumps(attachment))
slack.notify(attachments=attachment)
I'd like to know what needs to be changed on the above code snippet so the second message will appear as a thread reply.