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.
package/lib/server/router.d.ts
CHANGED
|
@@ -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").
|
|
8
|
+
ws(path: string, server: http.Server): import("ws").Server<typeof import("ws"), typeof http.IncomingMessage>;
|
|
9
9
|
}
|
package/lib/service/V12/index.js
CHANGED
|
@@ -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.
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
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
|
}
|