summaryrefslogtreecommitdiff
path: root/app/Subscriber/ProjectActivitySubscriber.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Subscriber/ProjectActivitySubscriber.php')
-rw-r--r--app/Subscriber/ProjectActivitySubscriber.php34
1 files changed, 26 insertions, 8 deletions
diff --git a/app/Subscriber/ProjectActivitySubscriber.php b/app/Subscriber/ProjectActivitySubscriber.php
index d2e85166..42314637 100644
--- a/app/Subscriber/ProjectActivitySubscriber.php
+++ b/app/Subscriber/ProjectActivitySubscriber.php
@@ -42,14 +42,32 @@ class ProjectActivitySubscriber extends Base implements EventSubscriberInterface
$values
);
- if ($this->config->get('integration_slack_webhook') == 1) {
- $this->slackWebhook->notify(
- $values['task']['project_id'],
- $values['task']['id'],
- $event_name,
- $values
- );
- }
+ $this->sendSlackNotification($event_name, $values);
+ $this->sendHipchatNotification($event_name, $values);
+ }
+ }
+
+ private function sendSlackNotification($event_name, array $values)
+ {
+ if ($this->config->get('integration_slack_webhook') == 1) {
+ $this->slackWebhook->notify(
+ $values['task']['project_id'],
+ $values['task']['id'],
+ $event_name,
+ $values
+ );
+ }
+ }
+
+ private function sendHipchatNotification($event_name, array $values)
+ {
+ if ($this->config->get('integration_hipchat') == 1) {
+ $this->hipchat->notify(
+ $values['task']['project_id'],
+ $values['task']['id'],
+ $event_name,
+ $values
+ );
}
}