onebots 0.4.1 → 0.4.2

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.
@@ -5,5 +5,5 @@ import { WebSocketServer } from "ws";
5
5
  import http from "http";
6
6
  export declare class Router extends KoaRouter {
7
7
  wsStack: WebSocketServer[];
8
- ws(path: string, server: http.Server): import("ws").Server<import("ws").WebSocket>;
8
+ ws(path: string, server: http.Server): import("ws").Server<typeof import("ws"), typeof http.IncomingMessage>;
9
9
  }
@@ -340,14 +340,13 @@ class V12 extends events_1.EventEmitter {
340
340
  data.detail_type = data.message_type || data.notice_type || data.request_type || data.system_type;
341
341
  data.message = data.type === 'message' ? V12.toSegment(data.message) : data.message;
342
342
  if (data.source)
343
- data.quote = {
344
- type: 'reply',
345
- data: {
346
- message_id: data.detail_type === 'private' ?
347
- (0, message_1.genDmMessageId)(data.source.user_id, data.source.seq, data.source.rand, data.source.time) :
348
- (0, message_1.genGroupMessageId)(data.group_id, data.source.user_id, data.source.seq, data.source.rand, data.source.time),
349
- user_id: data.source.user_id
350
- }
343
+ data.source = {
344
+ ...data.source,
345
+ message_id: data.detail_type === 'private' ?
346
+ (0, message_1.genDmMessageId)(data.source.user_id, data.source.seq, data.source.rand, data.source.time) :
347
+ (0, message_1.genGroupMessageId)(data.group_id, data.source.user_id, data.source.seq, data.source.rand, data.source.time),
348
+ user_id: data.source.user_id,
349
+ message: data.source.message,
351
350
  };
352
351
  return V12.formatPayload(this.oneBot.uin, event, data);
353
352
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onebots",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "基于icqq的多例oneBot实现",
5
5
  "engines": {
6
6
  "node": ">=16"