Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import buildBlocks from "../common/build-blocks.mjs";
import common from "../common/send-message.mjs";

export default {
...common,
...buildBlocks,
key: "slack-send-block-kit-message",
name: "Build and Send a Block Kit Message",
description: "Configure custom blocks and send to a channel, group, or user. [See the documentation](https://api.slack.com/tools/block-kit-builder).",
version: "0.4.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be 0.0.1 if it's new

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an action that existed previously, but was removed. I've encountered issues with republishing components at version 0.0.1 if they were previously published at a higher version. Since this one was at 0.3.3 when it was removed, I decided to use 0.4.0.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha!

type: "action",
props: {
slack: common.props.slack,
conversation: {
propDefinition: [
common.props.slack,
"conversation",
],
},
text: {
type: "string",
label: "Notification Text",
description: "Optionally provide a string for Slack to display as the new message notification (if you do not provide this, notification will be blank).",
optional: true,
},
...common.props,
...buildBlocks.props,
},
methods: {
...common.methods,
...buildBlocks.methods,
async getGeneratedBlocks() {
return await buildBlocks.run.call(this); // call buildBlocks.run with the current context
},
},
async run({ $ }) {
this.blocks = await this.getGeneratedBlocks(); // set the blocks prop for common.run to use
const resp = await common.run.call(this, {
$,
}); // call common.run with the current context
return resp;
},
};
2 changes: 1 addition & 1 deletion components/slack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/slack",
"version": "0.6.7",
"version": "0.7.0",
"description": "Pipedream Slack Components",
"main": "slack.app.mjs",
"keywords": [
Expand Down
Loading