Send SMSes to CS as well as recipients #2966

This commit is contained in:
Daniel Camargo 2014-04-16 17:14:18 -03:00
parent e46d28a9a5
commit 2c09fe825b
2 changed files with 1 additions and 17 deletions

View File

@ -131,7 +131,7 @@ class Controller_Support extends Crunchbutton_Controller_Account {
if ( $support->permissionToEdit() ) {
if( $_POST['text'] ){
$support->addAdminReply( $_POST['text'] );
if( ( $support->type == TYPE_SMS || $support->type == TYPE_BOX_NEED_HELP ) && $support->id_session_twilio ){
if( ( $support->type == Crunchbutton_Support::TYPE_SMS || $support->type == Crunchbutton_Support::TYPE_BOX_NEED_HELP ) && $support->id_session_twilio ){
$message = c::admin()->name . ' replied @' . $support->id_session_twilio . ' : ' . $_POST['text'];
Crunchbutton_Support::tellCustomerService( $message );
}

View File

@ -1,16 +0,0 @@
<?php
class Controller_tests_support extends Crunchbutton_Controller_Account {
public function init() {
// this script will add the new type COCKPIT_CHAT at support tickets
$supports = Crunchbutton_Support::q( 'SELECT * FROM support' );
foreach( $supports as $support ){
if( $support->firstMessage()->body == '(Ticket created at cockpit)' ){
$support->type = Crunchbutton_Support::TYPE_COCKPIT_CHAT;
$support->save();
}
}
echo 'done!';
}
}