Skip to content

Commit

Permalink
fixed message queue makeSignature not work
Browse files Browse the repository at this point in the history
  • Loading branch information
ymlluo committed Jun 13, 2022
1 parent de522b2 commit 7f48db1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Notify/BaseNotify.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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));
}
Expand Down

0 comments on commit 7f48db1

Please sign in to comment.