up. 优化代码内容

This commit is contained in:
扶桑花间 2025-08-29 23:33:36 +08:00
parent b0020f6623
commit 28cf17bbf2

View File

@ -23,9 +23,11 @@ class PutMessage
public function __construct(string $ws_client_id, string $type, string $event, array $data = [])
{
$this->wsClientId = $ws_client_id;
if ($type == MessageType::System) {
if ($type == MessageType::System->value) {
$this->type = MessageType::System;
$this->event = SystemEnum::tryFrom($event);
}else{
$this->type = null;
}
$this->data = $data;
}