lib/bot/responder.rb in bot-0.0.17 vs lib/bot/responder.rb in bot-0.0.18
- old
+ new
@@ -40,10 +40,15 @@
'type' => 'text',
'to' => message['from'],
'body' => message_text,
'typeTime' => 0
}
- text_response['suggestedResponses'] = suggested_responses if suggested_responses
+ case suggested_responses
+ when Array
+ text_response['suggestedResponses'] = suggested_responses
+ when Hash
+ text_response.merge!(suggested_responses)
+ end
text_response
end
def photo_response(photo_url, suggested_responses=false)
photo_response = {