diff --git a/lib/Slackbot_worker.js b/lib/Slackbot_worker.js index 402ed0a96..f99b28fc0 100755 --- a/lib/Slackbot_worker.js +++ b/lib/Slackbot_worker.js @@ -655,7 +655,7 @@ module.exports = function(botkit, config) { /* helper functions for creating dialog attachments */ - bot.createDialog = function(title, callback_id, submit_label, elements) { + bot.createDialog = function(title, callback_id, submit_label, elements, stateString) { var obj = { data: { @@ -663,6 +663,7 @@ module.exports = function(botkit, config) { callback_id: callback_id, submit_label: submit_label || null, elements: elements || [], + state: stateString, }, title: function(v) { this.data.title = v; @@ -676,6 +677,10 @@ module.exports = function(botkit, config) { this.data.submit_label = v; return this; }, + state: function(stateStr) { + this.data.state = stateStr; + return this; + }, addText: function(label, name, value, options, subtype) { var element = (typeof(label) === 'object') ? label : {