diff options
| author | Frédéric Guillot <fred@kanboard.net> | 2014-10-12 21:38:56 -0400 |
|---|---|---|
| committer | Frédéric Guillot <fred@kanboard.net> | 2014-10-12 21:38:56 -0400 |
| commit | 074056352de98fc567b4d13184c72887c75625d0 (patch) | |
| tree | 7d262c3a5d5f779648f51aa0eb7d9f279c05d89d /app/Model/Webhook.php | |
| parent | 4061927d215c846ff8eb196301bf61532018042b (diff) | |
Project activity refactoring and listeners improvements
Diffstat (limited to 'app/Model/Webhook.php')
| -rw-r--r-- | app/Model/Webhook.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/Model/Webhook.php b/app/Model/Webhook.php index 241806ba..b84728cf 100644 --- a/app/Model/Webhook.php +++ b/app/Model/Webhook.php @@ -88,9 +88,13 @@ class Webhook extends Base Task::EVENT_UPDATE, Task::EVENT_CLOSE, Task::EVENT_OPEN, + Task::EVENT_MOVE_COLUMN, + Task::EVENT_MOVE_POSITION, + Task::EVENT_ASSIGNEE_CHANGE, ); - $listener = new WebhookListener($this->url_task_modification, $this); + $listener = new WebhookListener($this->registry); + $listener->setUrl($this->url_task_modification); foreach ($events as $event_name) { $this->event->attach($event_name, $listener); @@ -104,7 +108,10 @@ class Webhook extends Base */ public function attachCreateEvents() { - $this->event->attach(Task::EVENT_CREATE, new WebhookListener($this->url_task_creation, $this)); + $listener = new WebhookListener($this->registry); + $listener->setUrl($this->url_task_creation); + + $this->event->attach(Task::EVENT_CREATE, $listener); } /** |
