Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/stealth/services/twilio/message_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def process
service_message.sender_id = params['From']
service_message.target_id = params['To']
service_message.message = params['Body']
service_message.location = { latitude: params['Latitude'], longitude: params['Longitude'] }

# Check for media attachments
attachment_count = params['NumMedia'].to_i
Expand Down
5 changes: 5 additions & 0 deletions lib/stealth/services/twilio/reply_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ def file
format_response({ body: reply['text'], media_url: reply['file_url'] })
end

def location
check_text_length
format_response({ body: reply['text'], persistent_action: ["geo:#{reply['latitude']},#{reply['longitude']}|#{reply['label']}"] })
end

def delay

end
Expand Down