Minor improvements to Slack:getPermalink

This commit is contained in:
Jan Oberhauser
2021-01-23 12:17:38 +01:00
parent 39fd7dc8ce
commit 09f075cc5a
3 changed files with 55 additions and 51 deletions

View File

@@ -15,6 +15,11 @@ export const messageOperations = [
},
},
options: [
{
name: 'Get Permalink',
value: 'getPermalink',
description: 'Get Permanent Link of a message',
},
{
name: 'Post',
value: 'post',
@@ -30,11 +35,6 @@ export const messageOperations = [
value: 'update',
description: 'Updates a message.',
},
{
name: 'Get Permalink',
value: 'getPermalink',
description: 'Get Permanent Link of a message',
},
],
default: 'post',
description: 'The operation to perform.',
@@ -43,6 +43,49 @@ export const messageOperations = [
export const messageFields = [
/* ----------------------------------------------------------------------- */
/* message:getPermalink
/* ----------------------------------------------------------------------- */
{
displayName: 'Channel',
name: 'channelId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getChannels',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'message',
],
operation: [
'getPermalink',
],
},
},
description: 'Channel containing the message.',
},
{
displayName: 'Timestamp',
name: 'timestamp',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'message',
],
operation: [
'getPermalink',
],
},
},
description: `Timestamp of the message to get permanent link.`,
},
/* -------------------------------------------------------------------------- */
/* message:post/postEphemeral */
/* -------------------------------------------------------------------------- */
@@ -1637,46 +1680,4 @@ export const messageFields = [
],
},
/* ----------------------------------------------------------------------- */
/* message:getPermaLink
/* ----------------------------------------------------------------------- */
{
displayName: 'Channel',
name: 'channelId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getChannels',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'message',
],
operation: [
'getPermalink',
],
},
},
description: 'Channel containing the message to be updated.',
},
{
displayName: 'TS',
name: 'messageTs',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'message',
],
operation: [
'getPermalink',
],
},
},
description: `Timestamp of the message to get permanent link.`,
},
] as INodeProperties[];