Sha256: 9ea5f6a3a33463d6bf73b544112f4784b4b12d1defe1165b3239b0ceb5e1c92f
Contents?: true
Size: 744 Bytes
Versions: 8
Compression:
Stored size: 744 Bytes
Contents
diff --git a/lib/slack/web/api/endpoints/views.rb b/lib/slack/web/api/endpoints/views.rb index 31626b9..8182a9c 100644 --- a/lib/slack/web/api/endpoints/views.rb +++ b/lib/slack/web/api/endpoints/views.rb @@ -40,6 +40,11 @@ module Slack def views_publish(options = {}) throw ArgumentError.new('Required arguments :user_id missing') if options[:user_id].nil? throw ArgumentError.new('Required arguments :view missing') if options[:view].nil? + if options.key?(:view) + view = options[:view] + view = JSON.dump(view) unless view.is_a?(String) + options = options.merge(view: view) + end post('views.publish', options) end
Version data entries
8 entries across 8 versions & 1 rubygems