Add channel_id output parameter (#149)
This commit is contained in:
@@ -23,6 +23,8 @@ outputs:
|
|||||||
description: 'The timestamp on the message that was posted into Slack when using bot token'
|
description: 'The timestamp on the message that was posted into Slack when using bot token'
|
||||||
ts: # timestamp of message posted
|
ts: # timestamp of message posted
|
||||||
description: 'The timestamp on the message that was posted into Slack when using bot token'
|
description: 'The timestamp on the message that was posted into Slack when using bot token'
|
||||||
|
channel_id: # Id of the channel. If channel name was used as input we can get ID from output for later use when updating message or posting to thread.
|
||||||
|
description: 'The channel id of the message that was posted into Slack when using bot token'
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node16'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
@@ -145,6 +145,8 @@ module.exports = async function slackSend(core) {
|
|||||||
// return the thread_ts if it exists, if not return the ts
|
// return the thread_ts if it exists, if not return the ts
|
||||||
const thread_ts = webResponse.thread_ts ? webResponse.thread_ts : webResponse.ts;
|
const thread_ts = webResponse.thread_ts ? webResponse.thread_ts : webResponse.ts;
|
||||||
core.setOutput('thread_ts', thread_ts);
|
core.setOutput('thread_ts', thread_ts);
|
||||||
|
// return id of the channel from the response
|
||||||
|
core.setOutput('channel_id', webResponse.channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
const time = (new Date()).toTimeString();
|
const time = (new Date()).toTimeString();
|
||||||
|
|||||||
Reference in New Issue
Block a user