Add Jabber/XMPP integration

This commit is contained in:
Frederic Guillot
2015-05-11 21:07:59 -04:00
parent a845e3f478
commit 9e9410df24
32 changed files with 525 additions and 62 deletions

View File

@@ -42,31 +42,18 @@ class ProjectActivitySubscriber extends Base implements EventSubscriberInterface
$values
);
$this->sendSlackNotification($event_name, $values);
$this->sendHipchatNotification($event_name, $values);
// Send notifications to third-party services
foreach (array('slackWebhook', 'hipchatWebhook', 'jabber') as $model) {
$this->$model->notify(
$values['task']['project_id'],
$values['task']['id'],
$event_name,
$values
);
}
}
}
private function sendSlackNotification($event_name, array $values)
{
$this->slackWebhook->notify(
$values['task']['project_id'],
$values['task']['id'],
$event_name,
$values
);
}
private function sendHipchatNotification($event_name, array $values)
{
$this->hipchatWebhook->notify(
$values['task']['project_id'],
$values['task']['id'],
$event_name,
$values
);
}
private function getValues(GenericEvent $event)
{
$values = array();