消息体支持原始json对象
This commit is contained in:
parent
ff5d7f4e3c
commit
7699a7d16d
|
@ -20,11 +20,11 @@ class Message
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $message_body
|
||||
* @param mixed $message_body
|
||||
*/
|
||||
public function setMessageBody(string $message_body): void
|
||||
public function setMessageBody($message_body): void
|
||||
{
|
||||
$this->messageBody = json_decode($message_body, true);
|
||||
$this->messageBody = is_array($message_body) ? $message_body : json_decode($message_body, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user