onebots 0.0.16 → 0.0.17

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.
@@ -190,8 +190,14 @@ class V12 extends events_1.EventEmitter {
190
190
  startWsReverse(config) {
191
191
  const ws = this._createWsr(config.url, config);
192
192
  this.on('dispatch', (unserialized) => {
193
+ const serialized = JSON.stringify(unserialized);
193
194
  if (this.wsr.has(ws)) {
194
- ws.send(JSON.stringify(unserialized));
195
+ ws.send(serialized, (err) => {
196
+ if (err)
197
+ this.logger.error(`反向WS(${ws.url})上报事件失败: ` + err.message);
198
+ else
199
+ this.logger.debug(`反向WS(${ws.url})上报事件成功: ` + serialized);
200
+ });
195
201
  }
196
202
  });
197
203
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onebots",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "基于oicq的多例oneBot实现",
5
5
  "main": "lib/index.js",
6
6
  "bin": {