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/index.d.cts CHANGED
@@ -657,6 +657,7 @@ declare class Deduplicator {
657
657
  */
658
658
  private getEventTypeKey;
659
659
  private getGroupMessageKey;
660
+ private getPrivateMessageKey;
660
661
  private getNoticeGroupKey;
661
662
  private getRequestKey;
662
663
  /**
package/dist/index.d.mts CHANGED
@@ -655,6 +655,7 @@ declare class Deduplicator {
655
655
  */
656
656
  private getEventTypeKey;
657
657
  private getGroupMessageKey;
658
+ private getPrivateMessageKey;
658
659
  private getNoticeGroupKey;
659
660
  private getRequestKey;
660
661
  /**
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-B4h-fhCq.mjs";
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 "";