Hi,
I would like to use incoming webhooks to make a threads about PRs in Bitbucket.
My problem is how to deal with tmid, it looks It does not accept my supplied PR _id.
Any idea what I’m doing wrong?
https://developer.rocket.chat/apidocs/post-message
tmid string
The message ID of the original message to reply to or to create a thread on.
Ok I understand what tmid is but if I cannot set it, how can send a message to a pull request thread with a webhook ?
I think you haven’t bothered to read enough and understand the issue.
You create a thread from a message.
So have to get the original message to reply in thread.
You’ll probably have to use something like a bot and some more intelligent processing to handle this.
If (message exists)
then {
reply in thread
} else {
reply as new message
}
English is not my first language, but as far as I can tell this “The message ID of the original message to reply to or to create a thread on” does not give me the impression I cannot set the message id by myself, it just tells me what it is and not who is creating it.
I was hoping I can use the ID from the PR so I do not to have to use a middleware to cache this ID.
Btw this would be a nice feature be able to set an ID like this to be able to aviod using/develop/maintain a bot for this.
but thx
That is only in reference to the ID of an existing message.
Nowhere does it say you can use your own ID in PostMessage either to create a new message or reply in thread to an existing one.
Imagine if you happened to accidentally use an ID already issued, or issued later, by the system?
Chaos.
You are hoping that you can use a simple solution to a more comllex problem.
Some form of intelligence will be required to do this I’m afraid.