aunubaileys 1.0.35 → 1.0.37

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/LICENSE CHANGED
@@ -1,7 +1,12 @@
1
1
  MIT License
2
2
 
3
+ Copyright (c) 2026 AunuCore Creative Network
3
4
  Copyright (c) 2025 Rajeh Taher/WhiskeySockets
4
5
 
6
+ AunuBaileys is developed and maintained by AunuCore Creative Network and is
7
+ based on Baileys by WhiskeySockets. The original copyright notice above is
8
+ retained as required by the MIT License.
9
+
5
10
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
11
  of this software and associated documentation files (the "Software"), to deal
7
12
  in the Software without restriction, including without limitation the rights
package/README.md CHANGED
@@ -64,6 +64,14 @@ Everything else is pure upstream. When upstream moves, we rebase the patch layer
64
64
 
65
65
 
66
66
 
67
+ ### 🆕 What's new in 1.0.37 / Baru di 1.0.37
68
+
69
+ - 📣 **Mention everyone in a group without listing a single JID** — until now, mentioning all group members meant building a `mentions` array of every participant JID yourself: heavy for large groups and impossible without group metadata. The new `mentionAll: true` message option sets WhatsApp's native `nonJidMentions` contextInfo flag, and receiving clients render it as a mass mention with no JID list at all. To carry the flag on the wire, `ContextInfo.nonJidMentions` (field 70, uint32 — matching the current WhatsApp proto) was added to this package's WAProto with full encode/decode/verify/fromObject/toObject support, proven by a byte-level roundtrip test. `mentionAll` combines freely with ordinary `mentions`; existing `mentions` behaviour is unchanged. Adapted from @itsliaaa/baileys.
70
+
71
+ ### 🆕 What's new in 1.0.36 / Baru di 1.0.36
72
+
73
+ - 📜 **The license now carries the AunuCore Creative Network copyright** — the LICENSE file previously listed only the upstream (WhiskeySockets) copyright, even though AunuBaileys is developed and maintained by AunuCore Creative Network. The primary copyright line is now AunuCore Creative Network, with the upstream attribution retained directly below it exactly as the MIT License requires, plus one line explaining the package's origin. The license itself is unchanged: still MIT, the package.json `license` field is still "MIT", and package users' rights are exactly as before. No code changes in this release.
74
+
67
75
  ### 🆕 What's new in 1.0.35 / Baru di 1.0.35
68
76
 
69
77
  - 📡 **Decrypt failures now emit a structured signal instead of a log flood** — one rotten session can fail hundreds of messages in minutes (B-01), and every failure was logged at ERROR level, drowning the logs while the bot had no programmatic way to know a Bad MAC flood was happening. Now: (1) the decrypt error log is throttled per sender address — first line immediately, then at most one line per minute per sender carrying the suppressed-failure count; (2) a new `messages.decrypt-failure` event carries the chat, sender, signal address, consecutive failure count, and whether this failure tripped the session/sender-key reset — consumers can alert and aggregate without parsing logs. The failure handling itself is unchanged. Closing release of the 1.0.14–1.0.35 fix train.
@@ -1055,6 +1055,7 @@ message ContextInfo {
1055
1055
  optional MemberLabel memberLabel = 62;
1056
1056
  optional bool isQuestion = 63;
1057
1057
  optional StatusSourceType statusSourceType = 64;
1058
+ optional uint32 nonJidMentions = 70;
1058
1059
  message AdReplyInfo {
1059
1060
  optional string advertiserName = 1;
1060
1061
  optional MediaType mediaType = 2;
@@ -10877,6 +10877,9 @@ export namespace proto {
10877
10877
 
10878
10878
  /** ContextInfo statusSourceType */
10879
10879
  statusSourceType?: (proto.ContextInfo.StatusSourceType|null);
10880
+
10881
+ /** ContextInfo nonJidMentions */
10882
+ nonJidMentions?: (number|null);
10880
10883
  }
10881
10884
 
10882
10885
  /** Represents a ContextInfo. */
@@ -11029,6 +11032,9 @@ export namespace proto {
11029
11032
  /** ContextInfo statusSourceType. */
11030
11033
  public statusSourceType?: (proto.ContextInfo.StatusSourceType|null);
11031
11034
 
11035
+ /** ContextInfo nonJidMentions. */
11036
+ public nonJidMentions?: (number|null);
11037
+
11032
11038
  /**
11033
11039
  * Creates a new ContextInfo instance using the specified properties.
11034
11040
  * @param [properties] Properties to set
package/WAProto/index.js CHANGED
@@ -32303,6 +32303,7 @@ export const proto = $root.proto = (() => {
32303
32303
  * @property {proto.IMemberLabel|null} [memberLabel] ContextInfo memberLabel
32304
32304
  * @property {boolean|null} [isQuestion] ContextInfo isQuestion
32305
32305
  * @property {proto.ContextInfo.StatusSourceType|null} [statusSourceType] ContextInfo statusSourceType
32306
+ * @property {number|null} [nonJidMentions] ContextInfo nonJidMentions
32306
32307
  */
32307
32308
 
32308
32309
  /**
@@ -32698,6 +32699,14 @@ export const proto = $root.proto = (() => {
32698
32699
  */
32699
32700
  ContextInfo.prototype.statusSourceType = null;
32700
32701
 
32702
+ /**
32703
+ * ContextInfo nonJidMentions.
32704
+ * @member {number|null|undefined} nonJidMentions
32705
+ * @memberof proto.ContextInfo
32706
+ * @instance
32707
+ */
32708
+ ContextInfo.prototype.nonJidMentions = null;
32709
+
32701
32710
  // OneOf field names bound to virtual getters and setters
32702
32711
  let $oneOfFields;
32703
32712
 
@@ -32971,6 +32980,12 @@ export const proto = $root.proto = (() => {
32971
32980
  set: $util.oneOfSetter($oneOfFields)
32972
32981
  });
32973
32982
 
32983
+ // Virtual OneOf for proto3 optional field
32984
+ Object.defineProperty(ContextInfo.prototype, "_nonJidMentions", {
32985
+ get: $util.oneOfGetter($oneOfFields = ["nonJidMentions"]),
32986
+ set: $util.oneOfSetter($oneOfFields)
32987
+ });
32988
+
32974
32989
  /**
32975
32990
  * Creates a new ContextInfo instance using the specified properties.
32976
32991
  * @function create
@@ -33091,6 +33106,8 @@ export const proto = $root.proto = (() => {
33091
33106
  writer.uint32(/* id 63, wireType 0 =*/504).bool(message.isQuestion);
33092
33107
  if (message.statusSourceType != null && Object.hasOwnProperty.call(message, "statusSourceType"))
33093
33108
  writer.uint32(/* id 64, wireType 0 =*/512).int32(message.statusSourceType);
33109
+ if (message.nonJidMentions != null && Object.hasOwnProperty.call(message, "nonJidMentions"))
33110
+ writer.uint32(/* id 70, wireType 0 =*/560).uint32(message.nonJidMentions);
33094
33111
  return writer;
33095
33112
  };
33096
33113
 
@@ -33317,6 +33334,10 @@ export const proto = $root.proto = (() => {
33317
33334
  message.statusSourceType = reader.int32();
33318
33335
  break;
33319
33336
  }
33337
+ case 70: {
33338
+ message.nonJidMentions = reader.uint32();
33339
+ break;
33340
+ }
33320
33341
  default:
33321
33342
  reader.skipType(tag & 7);
33322
33343
  break;
@@ -33661,6 +33682,11 @@ export const proto = $root.proto = (() => {
33661
33682
  break;
33662
33683
  }
33663
33684
  }
33685
+ if (message.nonJidMentions != null && message.hasOwnProperty("nonJidMentions")) {
33686
+ properties._nonJidMentions = 1;
33687
+ if (!$util.isInteger(message.nonJidMentions))
33688
+ return "nonJidMentions: integer expected";
33689
+ }
33664
33690
  return null;
33665
33691
  };
33666
33692
 
@@ -33923,6 +33949,8 @@ export const proto = $root.proto = (() => {
33923
33949
  message.statusSourceType = 5;
33924
33950
  break;
33925
33951
  }
33952
+ if (object.nonJidMentions != null)
33953
+ message.nonJidMentions = object.nonJidMentions >>> 0;
33926
33954
  return message;
33927
33955
  };
33928
33956
 
@@ -34181,6 +34209,11 @@ export const proto = $root.proto = (() => {
34181
34209
  if (options.oneofs)
34182
34210
  object._statusSourceType = "statusSourceType";
34183
34211
  }
34212
+ if (message.nonJidMentions != null && message.hasOwnProperty("nonJidMentions")) {
34213
+ object.nonJidMentions = message.nonJidMentions;
34214
+ if (options.oneofs)
34215
+ object._nonJidMentions = "nonJidMentions";
34216
+ }
34184
34217
  return object;
34185
34218
  };
34186
34219
 
@@ -65,6 +65,8 @@ export interface WAUrlInfo {
65
65
  type Mentionable = {
66
66
  /** list of jids that are mentioned in the accompanying text */
67
67
  mentions?: string[];
68
+ /** mention all group participants via the native non-JID mention flag (no JID list needed) */
69
+ mentionAll?: boolean;
68
70
  };
69
71
  type Contextable = {
70
72
  /** add contextInfo to the message */
@@ -794,15 +794,22 @@ export const generateWAMessageContent = async (message, options) => {
794
794
  if ('viewOnce' in message && !!message.viewOnce) {
795
795
  m = { viewOnceMessage: { message: m } };
796
796
  }
797
- if ('mentions' in message && message.mentions?.length) {
797
+ if (('mentions' in message && message.mentions?.length) ||
798
+ ('mentionAll' in message && !!message.mentionAll)) {
798
799
  const messageType = Object.keys(m)[0];
799
800
  const key = m[messageType];
800
801
  if ('contextInfo' in key && !!key.contextInfo) {
801
- key.contextInfo.mentionedJid = message.mentions;
802
+ if (message.mentions?.length) {
803
+ key.contextInfo.mentionedJid = message.mentions;
804
+ }
805
+ if (message.mentionAll) {
806
+ key.contextInfo.nonJidMentions = 1;
807
+ }
802
808
  }
803
809
  else if (key) {
804
810
  key.contextInfo = {
805
- mentionedJid: message.mentions
811
+ ...(message.mentions?.length ? { mentionedJid: message.mentions } : {}),
812
+ ...(message.mentionAll ? { nonJidMentions: 1 } : {})
806
813
  };
807
814
  }
808
815
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aunubaileys",
3
3
  "type": "module",
4
- "version": "1.0.35",
4
+ "version": "1.0.37",
5
5
  "description": "AunuBaileys \u2014 a WhatsApp Web API for bots that never sleep. Full upstream power with the beloved in-memory store restored and pairing that just works. Forged by AunuCore.",
6
6
  "keywords": [
7
7
  "whatsapp",