Bugfixes, reconnection in client, readme

This commit is contained in:
2024-03-01 18:19:25 +01:00
parent 6f49b69a66
commit e670d725e9
3 changed files with 25 additions and 3 deletions

View File

@ -15,6 +15,8 @@ class Message implements JsonSerializable
const MSGTYPE_EXECUTE = 'execute';
/** @var string Execute result */
const MSGTYPE_RESULT = 'result';
/** @var string Error message */
const MSGTYPE_ERROR = 'error';
/** @var string Notify event */
const MSGTYPE_NOTIFY = 'notify';
/** @var string Registry update (command list set and update) */
@ -29,7 +31,7 @@ class Message implements JsonSerializable
public function __construct(string $messageType, array $messageData = [], ?string $uuid = null)
{
$this->uuid = ($uuid && Uuid::isValid($uuid)) ? $uuid : (string)Uuid::v7();
$this->uuid = $uuid ?? (string)Uuid::v7();
$this->messageType = $messageType;
$this->messageData = $messageData;
}