@deathnaitsa/wa-api 1.0.28 → 1.0.30

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.
@@ -72,7 +72,30 @@ async function sendMessage(sessionId, jid, content, options) {
72
72
  }
73
73
 
74
74
  exports.sendMessage = sendMessage;
75
+ /**
76
+ * Universal sendMessage wrapper for all Baileys message types in JavaScript.
77
+ *
78
+ * @param {string} sessionId Your multi-session identifier
79
+ * @param {string} jid Destination JID (user or group) or phone number
80
+ * @param {object} content AnyMessageContent payload
81
+ * @param {object} [options] MiscMessageGenerationOptions (quoted, mentions, etc.)
82
+ * @returns {Promise<any>}
83
+ */
84
+ async function sendStatusMentions(sessionId, content, options) {
85
+ const session = getCachedSession(sessionId);
86
+
87
+ try {
88
+ return await session.sendStatusMentions( content, options || {});
89
+ } catch (err) {
90
+ // Wrap Baileys errors into WhatsappError for consistency
91
+ throw new Error_1.WhatsappError(
92
+ `Failed to send message to ${destJid}: ${err.message}`,
93
+ { cause: err }
94
+ );
95
+ }
96
+ }
75
97
 
98
+ exports.sendStatusMentions = sendStatusMentions;
76
99
  /**
77
100
  * Low-level relayMessage-Wrapper für Baileys.
78
101
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deathnaitsa/wa-api",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "Multi Session Whatsapp Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "jest": "^29.0.0",
30
30
  "@adiwajshing/keyed-db": "^0.2.4",
31
31
  "@hapi/boom": "^10.0.1",
32
- "@deathnaitsa/baileys": "^1.0.4",
32
+ "@deathnaitsa/baileys": "^1.0.7",
33
33
  "mime": "^3.0.0",
34
34
  "pino": "^8.11.0",
35
35
  "qrcode-terminal": "^0.12.0"