@pontalabs/baileys 1.2.1 → 1.2.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.
|
@@ -155,8 +155,7 @@ export const makeMessagesSocket = (config) => {
|
|
|
155
155
|
return null;
|
|
156
156
|
}
|
|
157
157
|
jid = jidNormalizedUser(jid);
|
|
158
|
-
|
|
159
|
-
return { jid, user };
|
|
158
|
+
return { jid, user };
|
|
160
159
|
})
|
|
161
160
|
.filter(jid => jid !== null);
|
|
162
161
|
let mgetDevices;
|
|
@@ -1127,7 +1126,7 @@ export const makeMessagesSocket = (config) => {
|
|
|
1127
1126
|
}
|
|
1128
1127
|
return album;
|
|
1129
1128
|
},
|
|
1130
|
-
sendMessage:
|
|
1129
|
+
sendMessage: async (jid, content, options = {}) => {
|
|
1131
1130
|
const userJid = authState.creds.me.id;
|
|
1132
1131
|
|
|
1133
1132
|
// `buildDelay` sends each item in `content.items` as its own Rich AI
|
|
@@ -1141,7 +1140,7 @@ export const makeMessagesSocket = (config) => {
|
|
|
1141
1140
|
const results = [];
|
|
1142
1141
|
for (let index = 0; index < content.items.length; index++) {
|
|
1143
1142
|
if (index > 0) await delay(buildDelay);
|
|
1144
|
-
results.push(await sendMessage(jid, content.items[index], sendOptions));
|
|
1143
|
+
results.push(await messagesSocket.sendMessage(jid, content.items[index], sendOptions));
|
|
1145
1144
|
}
|
|
1146
1145
|
return results;
|
|
1147
1146
|
}
|
|
@@ -1418,7 +1417,7 @@ export const makeMessagesSocket = (config) => {
|
|
|
1418
1417
|
}
|
|
1419
1418
|
return fullMsg;
|
|
1420
1419
|
}
|
|
1421
|
-
}
|
|
1420
|
+
},
|
|
1422
1421
|
sendTable: async (jid, title, headers, rows, quoted, options = {}) => {
|
|
1423
1422
|
const { message, messageId } = generateTableContent(title, headers, rows, quoted, options);
|
|
1424
1423
|
await relayMessage(jid, message, { messageId });
|
|
@@ -1481,5 +1480,6 @@ export const makeMessagesSocket = (config) => {
|
|
|
1481
1480
|
},
|
|
1482
1481
|
captureUnifiedResponse,
|
|
1483
1482
|
};
|
|
1483
|
+
return messagesSocket;
|
|
1484
1484
|
};
|
|
1485
1485
|
//# sourceMappingURL=messages-send.js.map
|
package/lib/Utils/mbuilder.js
CHANGED
|
@@ -3215,12 +3215,12 @@ const build = {
|
|
|
3215
3215
|
richTip: (text) => ({ richTip: text }),
|
|
3216
3216
|
richWidget: (data) => ({ richWidget: data }),
|
|
3217
3217
|
richFooterAction: (data) => ({ richFooterAction: data }),
|
|
3218
|
+
richHtml: (html) => ({ richHtml: html }),
|
|
3218
3219
|
richSuggest: (suggestion) => ({ richSuggest: suggestion }),
|
|
3219
3220
|
};
|
|
3220
3221
|
|
|
3221
3222
|
// Expose the namespace globally so applications can use build.* without
|
|
3222
3223
|
// importing another symbol. The named export remains available as well.
|
|
3223
|
-
// Always refresh the global namespace so newly added builder methods are available.
|
|
3224
3224
|
globalThis.build = build;
|
|
3225
3225
|
|
|
3226
3226
|
export { VERSION, Button, ButtonV2, Carousel, AIRich, Toolkit, build };
|
package/package.json
CHANGED