diff options
author | Valentin Popov <info@valentineus.link> | 2017-10-26 07:01:16 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2017-10-26 07:01:16 +0300 |
commit | 282e3bcaf1ce275c50e0168c4675b55159e17411 (patch) | |
tree | 8be2ecfc8084f6c0b685b6d6f077841a27bb20c5 | |
parent | c037edbc58c1728c27220ac36d8a00dc43940105 (diff) | |
download | local_webhooks-282e3bcaf1ce275c50e0168c4675b55159e17411.tar.xz local_webhooks-282e3bcaf1ce275c50e0168c4675b55159e17411.zip |
Add a token to the request
-rw-r--r-- | classes/events.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/classes/events.php b/classes/events.php index 33e278b..317ffed 100644 --- a/classes/events.php +++ b/classes/events.php @@ -77,6 +77,11 @@ class events { $events = unserialize(gzuncompress(base64_decode($callback->events))); if (boolval($events[$data["eventname"]])) { + /* Adding to the data token */ + if (boolval($callback->token)) { + $data["token"] = $callback->token; + } + self::send($data, $callback); } } |