diff --git a/src/Ushahidi/Addons/Mteja/ShortMessageController.php b/src/Ushahidi/Addons/Mteja/ShortMessageController.php index 370b0a8089..61f8e3b86d 100644 --- a/src/Ushahidi/Addons/Mteja/ShortMessageController.php +++ b/src/Ushahidi/Addons/Mteja/ShortMessageController.php @@ -24,21 +24,21 @@ class ShortMessageController extends DataSourceController public function handleRequest(Request $request) { // Remove Non-Numeric characters because that's what the DB has - $from = preg_replace("/[^0-9,+.]/", "", $request->input('from')); + $from = preg_replace("/[^0-9,+.]/", "", $request->input('customerNumber')); $this->save([ 'type' => MessageType::SMS, 'from' => $from, 'contact_type' => Contact::PHONE, 'message' => $request->input('text'), - 'to' => $request->input('to'), + 'to' => $request->input('virtualNumber'), 'title' => null, - 'datetime' => null, - 'data_source_message_id' => "mteja-" . UUID::uuid4()->toString(), + 'datetime' => $request->input('date'), + 'data_source_message_id' => $request->input('atSmsId', UUID::uuid4()->toString()), 'data_source' => 'mteja', 'additional_data' => [ - 'fieldName' => $request->input('fieldName'), - 'questionText' => $request->input('questionText') + 'appId' => $request->input('appId'), + // 'questionText' => $request->input('questionText') ] ]);