A module for receiving comments and forwarding them to a target Slack channel.
Steverobbins_Slack
This module was built on top of a Slack integration module by Steve Robbins. Its function is simple, to expose an endpoint proxy for passing channel comments to the Slack API.
N/A
N/A
public function receive(Varien_Event_Observer $observer)
{
/* @var $data Groove_SlackWebhook_Model_Payload */
$data = $observer->getEvent()->getObject();
if ($this->_validateData($data)) {
$model = Mage::getModel('slack/api_chat')
->setChannel($data->getChannel())
->setText($data->getText())
->postMessage();
}
}