When sending a message, one can pass the tmid
argument to the API to post said message to the thread of another message:
from rocketchat_API.rocketchat import RocketChat
rocket = RocketChat(server_url="(...)", user_id="...", auth_token="...")
room = "#my-channel"
response = rocket.chat_post_message("A message", room_id=room)
tmid = response.json()['message']['_id']
rocket.chat_post_message("A message in the previous message thread", room_id=room, tmid=tmid)
This is equivalent to the message.tmid
parameter of the /api/v1/chat.sendMessage
entry point.
On the interface for posting messages in a thread, there is a checkbox Also send to channel
:
But I can't find any equivalent either in the Python library or in the REST API documentation.
Question
How can I send a threaded message programmatically, that is also sent to the channel as if the above checkmark was ticked?