From 34a8badb6e6e59dab835abd0c0f635b6088d2a4c Mon Sep 17 00:00:00 2001 From: Jason Blais <13119842+jasonblais@users.noreply.github.com> Date: Mon, 3 Jun 2019 13:31:24 -0400 Subject: [PATCH 1/4] Fix missing plugin name and missing commas in READM example --- README.md | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 4ed8e4076..8e2882a4c 100644 --- a/README.md +++ b/README.md @@ -20,33 +20,37 @@ Use this plugin to improve onboarding and HR processes. It adds a Welcome Bot th To configure the Welcome Bot, edit your `config.json` file with a message you want to send to a user in the following format: ``` -"WelcomeMessages": [ - { - "TeamName": "your-team-name", - "DelayInSeconds": 3, - "Message": [ - "Your welcome message here. Each list item specifies one line in the message text." - ] - "AttachmentMessage": [ - "Attachment message containing user actions" - ], - "Actions" : [ +"Plugins": { + "com.mattermost.welcomebot": { + "WelcomeMessages": [ { - "ActionType": "button", - "ActionDisplayName": "User Action", - "ActionName": "action-name", - "ActionSuccessfulMessage": [ - "Message posted after the user takes this action and joins channels specified by 'ChannelsAddedTo'." + "TeamName": "your-team-name", + "DelayInSeconds": 3, + "Message": [ + "Your welcome message here. Each list item specifies one line in the message text." + ], + "AttachmentMessage": [ + "Attachment message containing user actions" + ], + "Actions" : [ + { + "ActionType": "button", + "ActionDisplayName": "User Action", + "ActionName": "action-name", + "ActionSuccessfulMessage": [ + "Message posted after the user takes this action and joins channels specified by 'ChannelsAddedTo'." + ], + "ChannelsAddedTo": ["channel1", "channel2"], + }, + { + "ActionType": "automatic", + "ChannelsAddedTo": ["channel3", "channel4"] + } ] - "ChannelsAddedTo": ["channel1", "channel2"], - }, - { - "ActionType": "automatic", - "ChannelsAddedTo": ["channel3", "channel4"] } ] } -] +}, ``` where From 047a3d9631ec74d09733b2e0fab6fcfe183b4ef1 Mon Sep 17 00:00:00 2001 From: Jason Blais <13119842+jasonblais@users.noreply.github.com> Date: Mon, 3 Jun 2019 13:43:19 -0400 Subject: [PATCH 2/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e2882a4c..4cfe0de4f 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ To configure the Welcome Bot, edit your `config.json` file with a message you wa "ActionSuccessfulMessage": [ "Message posted after the user takes this action and joins channels specified by 'ChannelsAddedTo'." ], - "ChannelsAddedTo": ["channel1", "channel2"], + "ChannelsAddedTo": ["channel1", "channel2"] }, { "ActionType": "automatic", From c9c7c1e94a204937885b6c0070bcecf25c7a1aed Mon Sep 17 00:00:00 2001 From: Jason Blais <13119842+jasonblais@users.noreply.github.com> Date: Mon, 3 Jun 2019 13:43:56 -0400 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4cfe0de4f..cdb9c43b7 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ To configure the Welcome Bot, edit your `config.json` file with a message you wa where -- **TeamName**: The team for which the Welcome Bot sends a message for. Refers to the team handle used in the URL. For example, in the following URL the **TeamName** value is `myteam`: https://example.com/myteam/channels/mychannel +- **TeamName**: The team for which the Welcome Bot sends a message for. Must be the team handle used in the URL, in lowercase. For example, in the following URL the **TeamName** value is `myteam`: https://example.com/myteam/channels/mychannel - **DelayInSeconds**: The number of seconds after joining a team that the user receives a welcome message. - **Message**: The message posted to the user. - (Optional) **AttachmentMessage**: Message text in attachment containing user action buttons. From 5578a8de5d3032acdb4405b4c7a2672e61dabe96 Mon Sep 17 00:00:00 2001 From: Jason Blais <13119842+jasonblais@users.noreply.github.com> Date: Mon, 3 Jun 2019 13:56:03 -0400 Subject: [PATCH 4/4] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cdb9c43b7..213016fee 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,11 @@ To configure the Welcome Bot, edit your `config.json` file with a message you wa "ActionSuccessfulMessage": [ "Message posted after the user takes this action and joins channels specified by 'ChannelsAddedTo'." ], - "ChannelsAddedTo": ["channel1", "channel2"] + "ChannelsAddedTo": ["channel-1", "channel-2"] }, { "ActionType": "automatic", - "ChannelsAddedTo": ["channel3", "channel4"] + "ChannelsAddedTo": ["channel-3", "channel-4"] } ] } @@ -55,7 +55,7 @@ To configure the Welcome Bot, edit your `config.json` file with a message you wa where -- **TeamName**: The team for which the Welcome Bot sends a message for. Must be the team handle used in the URL, in lowercase. For example, in the following URL the **TeamName** value is `myteam`: https://example.com/myteam/channels/mychannel +- **TeamName**: The team for which the Welcome Bot sends a message for. Must be the team handle used in the URL, in lowercase. For example, in the following URL the **TeamName** value is `my-team`: https://example.com/my-team/channels/my-channel - **DelayInSeconds**: The number of seconds after joining a team that the user receives a welcome message. - **Message**: The message posted to the user. - (Optional) **AttachmentMessage**: Message text in attachment containing user action buttons. @@ -64,7 +64,7 @@ where - **ActionDisplayName**: Sets the display name for the user action buttons. - **ActionName**: Sets the action name used by the plugin to identify which action is taken by a user. - **ActionSuccessfulMessage**: Message posted after the user takes this action and joins the specified channels. - - **ChannelsAddedTo**: List of channels the user is added to. + - **ChannelsAddedTo**: List of channel names the user is added to. Must be the channel handle used in the URL, in lowercase. For example, in the following URL the **channel name** value is `my-channel`: https://example.com/my-team/channels/my-channel ## Example