Comments (5)
Hey Andrew, apologies for the delayed response to this, I've been a bit busy with research and thesis work. I like the proposal and will aim to have it implemented in the next day or two.
from slackblocks.
Working on this now. I forgot to mention that as a stopgap I'd made the channel field optional on Message for the time being.
from slackblocks.
I think I've implemented what is was you're after. It's difficult to run an integration test for this kind of thing without setting up a sever. Let me know if I've overlooked anything.
from slackblocks.
Looks good! I'll test it out when I get a chance.
It looks like I slightly misread the different ways Slack allows an API server to respond to an interaction. Apparently an "Acknowledgement response" is just a plain HTTP request with a 200 status, which must be sent within 3 seconds (this just prevents a little error icon from appearing next to the button the user clicked in Slack).
What you implemented, and what I originally thought of as an acknowledgement response, actually has the very generic name of "Message response". Besides not needing a channel (Slack can figure that out from the response URL it gives you), it's basically a typical message with two additional attributes: the boolean replace__original
, which you already implemented, and response_type
, which can be set to "ephemeral"
to send a message only visible to the interacting user.
TL:DR; You can add response_type
to the AcknowledgementResponse
constructor (or just add an ephemeral
boolean argument since that's the only value it can take anyway). You could also rename AcknowledgementResponse
to MessageResponse
, although imo Slack's terminology is a little confusing. Lastly, the default value for replace_original
should probably be False instead of True, but it's not a big deal. Thanks for taking the time to implement it!
from slackblocks.
That makes a lot of sense wrt the availability of documentation for AcknowledgementResponses. I've made the suggested changes in the latest version. If you do end up using it, let me know how it goes.
from slackblocks.
Related Issues (20)
- Cannot create a modal view without submit button
- Cannot use EmailInput inside InputBlock HOT 1
- Cannot create UserSelectMenu object with placeholder=None HOT 1
- Add unfurl_links and unfurl_media arguments to Message
- Slack Client requires a dict for publishing views HOT 1
- 75 chars limitation on Text Fields. HOT 5
- [ERROR] must be a boolean [json-pointer:/view/blocks/2/dispatch_action] when setting dispatch_action at InputBlock
- Feature request: Add support for rich_text block types and its supported object types HOT 5
- StaticSelectMenu & StaticMultiSelectMenu do not support default Option TextType
- DateTimePicker not in ALLOWED_INPUT_ELEMENTS for InputBlock HOT 1
- DatePicker errors when not given optional inital_date on creation. HOT 4
- Question: Supported way to use slackblocks with WebhookClient HOT 3
- Initial users appears to be broken on the UserMultiSelectMenu HOT 2
- ExternalSelectMenu initial_option does not automatically serialize Option object HOT 2
- `elements.Image`: `alt_text` argument shouldn't be required HOT 2
- StaticMultiSelectMenu not allowing initial_options due typing. HOT 1
- RIchTextList and nested RIchText issues HOT 1
- Add discussions to repo? HOT 2
- ContextBlock elements arg has the wrong type HOT 2
- [Documentation] Multiple broken links on docs homepage HOT 3
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 slackblocks.