mioki 0.15.0 → 0.15.1
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/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/dist/package-75_Caljc.mjs +6 -0
- package/dist/package-75_Caljc.mjs.map +1 -0
- package/dist/{package-49Rgph2M.cjs → package-DrAKGYns.cjs} +2 -2
- package/dist/package-DrAKGYns.cjs.map +1 -0
- package/package.json +2 -2
- package/dist/package-49Rgph2M.cjs.map +0 -1
- package/dist/package-B4h-fhCq.mjs +0 -6
- package/dist/package-B4h-fhCq.mjs.map +0 -1
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-BiucMVzj.mjs";
|
|
2
|
-
import { t as version } from "./package-
|
|
2
|
+
import { t as version } from "./package-75_Caljc.mjs";
|
|
3
3
|
import fs, { default as fs$1 } from "node:fs";
|
|
4
4
|
import util from "node:util";
|
|
5
5
|
import path, { default as path$1 } from "node:path";
|
|
@@ -1242,6 +1242,13 @@ var Deduplicator = class {
|
|
|
1242
1242
|
const raw = e.raw_message ?? "_";
|
|
1243
1243
|
return `msg:group:${groupId}:${userId}:${time}:${crypto.createHash("md5").update(raw).digest("hex")}`;
|
|
1244
1244
|
}
|
|
1245
|
+
getPrivateMessageKey(e) {
|
|
1246
|
+
const userId = e.user_id ?? "_";
|
|
1247
|
+
const targetId = e.target_id ?? "_";
|
|
1248
|
+
const time = e.time ?? "_";
|
|
1249
|
+
const raw = e.raw_message ?? "_";
|
|
1250
|
+
return `msg:private:${userId}:${targetId}:${time}:${crypto.createHash("md5").update(raw).digest("hex")}`;
|
|
1251
|
+
}
|
|
1245
1252
|
getNoticeGroupKey(e) {
|
|
1246
1253
|
return `${this.getEventTypeKey(e)}:${e.group_id ?? "_"}:${e.user_id ?? "_"}:${"operator_id" in e ? e.operator_id ?? "_" : "_"}:${"target_id" in e ? e.target_id ?? "_" : "_"}:${e.sub_type ?? "_"}:${"action_type" in e ? e.action_type ?? "_" : "_"}:${"duration" in e ? e.duration ?? "_" : "_"}:${e.time ?? "_"}`;
|
|
1247
1254
|
}
|
|
@@ -1259,6 +1266,7 @@ var Deduplicator = class {
|
|
|
1259
1266
|
getKey(e) {
|
|
1260
1267
|
const typeKey = this.getEventTypeKey(e);
|
|
1261
1268
|
if (typeKey === "msg:group") return this.getGroupMessageKey(e);
|
|
1269
|
+
if (typeKey === "msg:private") return this.getPrivateMessageKey(e);
|
|
1262
1270
|
if (typeKey.startsWith("notice:group:")) return this.getNoticeGroupKey(e);
|
|
1263
1271
|
if (typeKey.startsWith("req:")) return this.getRequestKey(e);
|
|
1264
1272
|
return "";
|