summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2017-10-26 07:01:16 +0300
committerValentin Popov <info@valentineus.link>2017-10-26 07:01:16 +0300
commit282e3bcaf1ce275c50e0168c4675b55159e17411 (patch)
tree8be2ecfc8084f6c0b685b6d6f077841a27bb20c5
parentc037edbc58c1728c27220ac36d8a00dc43940105 (diff)
downloadlocal_webhooks-282e3bcaf1ce275c50e0168c4675b55159e17411.tar.xz
local_webhooks-282e3bcaf1ce275c50e0168c4675b55159e17411.zip
Add a token to the request
-rw-r--r--classes/events.php5
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);
}
}