onebots 0.4.56 → 0.4.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/service/V12/index.js +2 -5
- package/package.json +2 -2
package/lib/service/V12/index.js
CHANGED
|
@@ -620,14 +620,11 @@ class V12 extends service_1.Service {
|
|
|
620
620
|
if (config.access_token)
|
|
621
621
|
remoteUrl += `?access_token=${config.access_token}`;
|
|
622
622
|
const headers = {
|
|
623
|
-
"
|
|
624
|
-
"X-Client-Role": "Universal",
|
|
625
|
-
"User-Agent": `OneBot/12 (${this.oneBot.platform}) Node-onebots/V12`,
|
|
626
|
-
"Sec-WebSocket-Protocol": "12.onebots.v" + utils_1.version,
|
|
623
|
+
"User-Agent": `OneBot/12 (${this.oneBot.platform}) onebots/${utils_1.version}`,
|
|
627
624
|
};
|
|
628
625
|
if (config.access_token)
|
|
629
626
|
headers.Authorization = "Bearer " + config.access_token;
|
|
630
|
-
const ws = new ws_1.WebSocket(remoteUrl, { headers });
|
|
627
|
+
const ws = new ws_1.WebSocket(remoteUrl, ["12.OneBots"], { headers });
|
|
631
628
|
ws.on("error", err => {
|
|
632
629
|
this.logger.error(err.message);
|
|
633
630
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onebots",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.57",
|
|
4
4
|
"description": "基于icqq的多例oneBot实现",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16"
|
|
@@ -83,6 +83,6 @@
|
|
|
83
83
|
"koa-static": "^5.0.0",
|
|
84
84
|
"log4js": "^6.5.2",
|
|
85
85
|
"reflect-metadata": "^0.1.13",
|
|
86
|
-
"ws": "^8.
|
|
86
|
+
"ws": "^8.16.0"
|
|
87
87
|
}
|
|
88
88
|
}
|