Is something wrong with that JSON? I have tried other things like only returning a text message.
I’ve set log level to DEBUG and don’t find anything suspicious there.
I wonder, if I have misunderstood the docs and the client will never even evaluate a response from a POST triggered by an interactive message. In that case I would have to make a new request back from my server to the Mattermost API in order to get to the next step in my workflow. Is that correct?
I have asked the same question on StackOverflow, but no answers yet.
client will never even evaluate a response from a POST triggered by an interactive message
Pardon, I misread this.
From what I got, Mattermost controls do requests and doesn’t handle anything these requests return.
Right now we use custom integration service which transforms info it gets from buttons into the valid mattermost api call.
I’ve replaced The integration can respond with an update to the original post, or with an ephemeral message with The integration can then perform a separate API call with an update to the original post, or with an ephemeral message:
Happy to address any other issues or add tips that will make it easier for others.
Hey @aaronrothschild, Yeah that sounds like a very good idea. Thanks for your work there!
Maybe you could mention in a more prominent place that the Mattermost server will never evaluate response bodies from requests coming from Mattermost controls. I didn’t find that anywhere in the docs and there is no warning in the logs. Your suggested edit is a step in the right direction, but it might still be overlooked. And for me it was a pretty frustrating experience to find that out by trial and error - and @xlorken’s help of course.
How about a listing of the different kinds of integrations and whether the server will evaluate response bodies or not?
Slash Commands - Yes
Incoming Webhooks - Yes
POSTs from interactive controls - No
I’ve created a PR for the doc change and have added a table with the different integration types. It would be great if you could add some more context, I’ve also asked one of our developers to review this. Thanks for your help, and sorry about the frustrations you encountered!
Hey @aaronrothschild, that looks pretty good to me. Although I don’t know what I was thinking when mentioning incoming webhooks. That’s a request, not a response and I think everyone knows that the server evaluates the request body as otherwise they’d be useless. Outgoing webhooks on the other hand should be mentioned. I haven’t tried them though and would have no idea, whether their responses would be evaluated.