Comments (8)
Certainly, does this document update capture it?
from mattermost-developer-documentation.
Hey @JAGFin1,
Right now there is no way to directly send an ephemeral message within the dialog submit response. But you can use the REST API to do so. Or the plugins API if you are developing a plugin.
On the other hand I see the need of having the possibility build into the response.
@jasonblais Thoughts on adding something like EphemeralText
to SubmitDialogResponse
?
from mattermost-developer-documentation.
@hanzei 0/5, but I think @JAGFin1 is asking for a concrete example of how to respond to a Dialog submission. Is this something you'd be open to helping with, or should we queue this for engineers to help with?
from mattermost-developer-documentation.
A basic example would be:
response := &model.SubmitDialogResponse{
Errors: map[string]string{
someKey: "Some erro",
},
}
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
_, _ = w.Write(response.ToJson())
inside your http server that handles the submit dialog request. This would show an error for the element with the key someKey
.
@JAGFin1 Are you using a plugin or the REST API to open the dialog? If you want, I can share an example on how to send an ephemeral message.
from mattermost-developer-documentation.
Hi @hanzei,
I'm using the REST API to open the dialog. That's working as intended. The specific issue is when the user submits the dialog (and thus performs a request back to my service), I do not know what the HTTP response should contain in order for Mattermost to display a message as a "Your submission has been logged" type of message.
That being said, I believe I may have misunderstood the original documentation. Based on what you said, it looks like I need to send a separate request back to Mattermost once my service has received (and responded to) a submission request from a dialog. This differs from how errors are handled as they are returned directly in the response.
Is that correct? If so, I can manage that.
from mattermost-developer-documentation.
That is correct @JAGFin1.
@jasonblais what do you think about clarifying this in the docs?
from mattermost-developer-documentation.
Thanks for the clarification @hanzei and @jasonblais. The amendment to the documentation has made it clearer about what the integration needs to do. If possible, a JSON example for the HTTP API (and endpoint) or a reference to the /posts/ephemeral
documentation would be perfect.
from mattermost-developer-documentation.
Thanks for your suggestion @JAGFin1. 👍 I opened a PR to add a code sample to the API documentation.
Closing this one.
from mattermost-developer-documentation.
Related Issues (20)
- Help Wanted: Validate dev docs README using Golang v.1.19 HOT 2
- Search bar not displaying correctly in Firefox 109.0 HOT 3
- Help Wanted: Document usage of .nvmrc in plugin projects HOT 5
- outdated docs still published HOT 2
- Request for Documentation: test
- Help Wanted: Add Gitpod docs link to server repo's README HOT 8
- Help Wanted: Gitpod docs have outdated screenshots for the mattermost GitHub repository
- Help Wanted: Emphasize in Gitpod docs how to contribute to a plugin project
- Error when working with slash commands HOT 1
- Request for Documentation: test tile HOT 1
- Request for Documentation: fff HOT 1
- Documentation lacks instructions for setting up appsctl on self hosted Mattermost Server on AWS EC2
- Help Wanted: OpenSSL 3.0 legacy provider note HOT 2
- Optimize development environment setup document HOT 1
- Request for Documentation: Document title
- Help Wanted: Hamburger Menu Issue HOT 7
- "Contribute" and "Integrate & Extend" Section Content Alignment Enhancement HOT 2
- Help Wanted: Code blocks within tabbed content blocks are being double spaced HOT 1
- Request for Documentation: test HOT 1
- Help Wanted: Correct Attachments documentation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mattermost-developer-documentation.