Skip to content
Open
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
7 changes: 4 additions & 3 deletions pullInboundMessageLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ function pullMessages(uri) {
request.get(parameters, function(error, httpResponse, body){

async.forEachOf(JSON.parse(body).messages, function(item,key){

if(item.direction == 'inbound') {

// Delete item.direction === <your_unnecessary_direction> to filter on inbound or outbound
if(item.direction === 'inbound' || item.direection === 'outbound') {
//Assign countries or Short Code based on country code/number length
//Have to use try/catch blocks because the ported libphonenumber I'm using doesn't have callbacks
try {
Expand Down Expand Up @@ -98,4 +99,4 @@ function pullMessages(uri) {

});

}
}