Skip to content

Commit

Permalink
return tropo object from send_message and catc_message methods
Browse files Browse the repository at this point in the history
  • Loading branch information
johntdyer committed Aug 11, 2011
1 parent 961cebd commit 6e44fca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.rb
Expand Up @@ -50,7 +50,7 @@ def send_msg(session_object)
say :value => sessions_object[:session][:parameters][:msg]
end
end
tropo.response
tropo
end

def receive_msg
Expand All @@ -62,13 +62,13 @@ def receive_msg
say "stop trying to cheat, one entry per number"
end
end
tropo.response
tropo
end

post '/msg' do
sessions_object = Tropo::Generator.parse request.env['rack.input'].read
p sessions_object
tropo = sessions_object["session"]["initial_text"] ? receive_msg(sessions_object["session"]["initial_text"]) : send_msg(session_object)
tropo = sessions_object["session"]["initial_text"] ? receive_msg(sessions_object["session"]["initial_text"]) : send_msg(sessions_object)
tropo.response
end

Expand Down

0 comments on commit 6e44fca

Please sign in to comment.