public function addOrderConversationAction() { parent::addOrderConversation(Model_OrderConversation::SENDER_DRIVER); $this->sendResult(); }
public function addOrderConversationAction() { $sn = trim($this->_getParam('sn')); $message = trim($this->_getParam('message')); $imageUrl = $this->_getParam('imageUrl'); $oc = new Model_OrderConversation(); $oc->set('sn', $sn); $oc->set('sender', Model_OrderConversation::SENDER_CS); $oc->set('message', $message); $oc->set('image_url', $imageUrl); $oc->set('created_time', time()); $oc->save(); $arp = new AjaxResponse(); $arp->setStatus(AjaxResponse::STATUS_OK); $this->json($arp); $c = new ApiControllerAbstract(); $c->sendPush(Model_OrderConversation::SENDER_CS, $sn, $message); }