onebots 0.0.12 → 0.0.13

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.
@@ -127,12 +127,12 @@ class V11 extends events_1.EventEmitter {
127
127
  this.logger.error(err.message);
128
128
  });
129
129
  this.wss.on("connection", (ws, req) => {
130
- this.logger.info(`ws客户端(${req.headers.origin})已连接`);
130
+ this.logger.info(`ws客户端(${req.url})已连接`);
131
131
  ws.on("error", (err) => {
132
- this.logger.error(`ws客户端(${req.headers.origin})报错:${err.message}`);
132
+ this.logger.error(`ws客户端(${req.url})报错:${err.message}`);
133
133
  });
134
134
  ws.on("close", (code, reason) => {
135
- this.logger.warn(`ws客户端(${req.headers.origin})连接关闭,关闭码${code},关闭理由:` + reason);
135
+ this.logger.warn(`ws客户端(${req.url})连接关闭,关闭码${code},关闭理由:` + reason);
136
136
  });
137
137
  if (this.config.access_token) {
138
138
  const url = new url_1.URL(req.url, "http://127.0.0.1");
@@ -162,12 +162,12 @@ class V12 extends events_1.EventEmitter {
162
162
  this.logger.error(err.message);
163
163
  });
164
164
  this.wss.on("connection", (ws, req) => {
165
- this.logger.info(`ws客户端(${req.headers.origin})已连接`);
165
+ this.logger.info(`ws客户端(${req.url})已连接`);
166
166
  ws.on("error", (err) => {
167
- this.logger.error(`ws客户端(${req.headers.origin})报错:${err.message}`);
167
+ this.logger.error(`ws客户端(${req.url})报错:${err.message}`);
168
168
  });
169
169
  ws.on("close", (code, reason) => {
170
- this.logger.warn(`ws客户端(${req.headers.origin})连接关闭,关闭码${code},关闭理由:` + reason);
170
+ this.logger.warn(`ws客户端(${req.url})连接关闭,关闭码${code},关闭理由:` + reason);
171
171
  });
172
172
  if (config.access_token) {
173
173
  const url = new url_1.URL(req.url, "http://127.0.0.1");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onebots",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "基于oicq的多例oneBot实现",
5
5
  "main": "lib/index.js",
6
6
  "bin": {