diff --git a/changelog.md b/changelog.md index ccaed5a..857fe0d 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,10 @@ All notable changes to `GroupRobot` will be documented in this file. +## Version 1.1.2 + +- fixed message queue makeSignature not work + ## Version 1.0 ### Added diff --git a/src/Notify/BaseNotify.php b/src/Notify/BaseNotify.php index 7530dc8..51669a1 100644 --- a/src/Notify/BaseNotify.php +++ b/src/Notify/BaseNotify.php @@ -145,9 +145,6 @@ public function send() if (!$this->webhook) { throw new \Exception('webhook not set'); } - if ($this->secret) { - $this->makeSignature(); - } if ($this->use_queue && $this->message_queues) { $this->message = array_shift($this->message_queues); } else { @@ -161,6 +158,9 @@ public function send() if ($this->message_at) { $this->concatAt(); } + if ($this->secret) { + $this->makeSignature(); + } $response = $this->getClient()->post($this->webhook, ['json' => $this->message, 'http_errors' => false, 'verify' => false, 'timeout' => 10]); $result = $this->formatResult(json_decode((string)$response->getBody(), true)); }