Skip to content

Commit

Permalink
Added network code to inbound messages
Browse files Browse the repository at this point in the history
  • Loading branch information
prawnsalad committed Oct 24, 2011
1 parent 2f013b7 commit e8f9926
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NexmoMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class NexmoMessage {
public $to = '';
public $from = '';
public $text = '';
public $network = '';


function NexmoMessage ($nx_key, $nx_password) {
Expand Down Expand Up @@ -197,7 +198,7 @@ private function validateOriginator($inp){
$ret = preg_replace('/[^a-zA-Z0-9]/', '', (string)$inp);

if(preg_match('/[a-zA-Z]/', $inp)){

// Alphanumeric format so make sure it's < 11 chars
$ret = substr($ret, 0, 11);

Expand Down Expand Up @@ -277,6 +278,7 @@ public function inboundText( $data=null ){
$this->to = $data['to'];
$this->from = $data['msisdn'];
$this->text = $data['text'];
$this->network = $data['network-code'];

// Flag that we have an inbound message
$this->inbound_message = true;
Expand Down

0 comments on commit e8f9926

Please sign in to comment.