Compare commits

..

No commits in common. "master" and "1.1.0" have entirely different histories.

4 changed files with 4 additions and 5 deletions

View File

@ -7,13 +7,13 @@
}
},
"require": {
"php": "~8.0 || ~8.1 || ~8.2 || ~8.3"
"php": "~8.0 || ~8.1 || ~8.2"
},
"require-dev": {
"zhamao/framework": "dev-main"
},
"minimum-stability": "dev",
"extra": {
"zm-plugin-version": "1.1.1"
"zm-plugin-version": "1.0.0"
}
}

View File

@ -50,6 +50,7 @@ class GocqAdapter
#[BindEvent(WebSocketOpenEvent::class)]
public function handleWSReverseOpen(WebSocketOpenEvent $event): void
{
logger()->info('连接到 ob11');
$request = $event->getRequest();
// 判断是不是 Gocq 或 OneBot 11 标准的连接。OB11 标准必须带有 X-Client-Role 和 X-Self-ID 两个头。
if ($request->getHeaderLine('X-Client-Role') === 'Universal' && $request->getHeaderLine('X-Self-ID') !== '') {

View File

@ -76,8 +76,6 @@ class GocqSegmentConverter
public function parseSegment11To12(string $type, array $data): array
{
switch ($type) {
case 'text':
return [$type, $data];
case 'at':
$qq = $data['qq'];
unset($data['qq']);

View File

@ -1,5 +1,5 @@
{
"name": "go-cqhttp-adapter-plugin",
"version": "1.1.1",
"version": "1.0.0",
"main": "main.php"
}