@vanzxy/baileys 1.0.7 → 1.0.9
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/lib/Utils/messages.js +3 -8
- package/package.json +1 -1
package/lib/Utils/messages.js
CHANGED
|
@@ -37,7 +37,7 @@ const mediaAnnotation = [
|
|
|
37
37
|
],
|
|
38
38
|
newsletter: {
|
|
39
39
|
// Lia@Note 03-02-26 --- You can change jid, message id, and name via .env (≧▽≦)
|
|
40
|
-
newsletterJid: process.env.NEWSLETTER_ID ||
|
|
40
|
+
newsletterJid: jid === 'status@broadcast' ? null : (process.env.NEWSLETTER_ID ||
|
|
41
41
|
Buffer.from('313230333633343034303036363434313339406e6577736c6574746572', 'hex').toString(),
|
|
42
42
|
newsletterName: process.env.NEWSLETTER_NAME ||
|
|
43
43
|
Buffer.from('f09d96b2f09d978df09d96baf09d978bf09d96bff09d96baf09d9785f09d9785', 'hex').toString(),
|
|
@@ -1332,16 +1332,11 @@ export const generateWAMessageContent = async (message, options) => {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
}
|
|
1334
1334
|
// Lia@Changes 31-01-26 --- Add "groupStatus" boolean to set contextInfo.isGroupStatus and wrap message into groupStatusMessageV2
|
|
1335
|
-
if (hasOptionalProperty(message, 'groupStatus') && !!message.groupStatus) {
|
|
1335
|
+
if ((hasOptionalProperty(message, 'groupStatus') && !!message.groupStatus) || jid === 'status@broadcast') {
|
|
1336
1336
|
const messageType = Object.keys(m)[0];
|
|
1337
1337
|
const key = m[messageType];
|
|
1338
|
-
// Vanzxy@Fix --- Force ptt:true for audio in group status so it plays on Android
|
|
1339
|
-
if (messageType === 'audioMessage' && key) {
|
|
1340
|
-
key.ptt = true;
|
|
1341
|
-
}
|
|
1342
|
-
// Vanzxy@Fix --- Strip contextInfo (quoted/stanzaId/participant) to prevent "Lihat saluran" button
|
|
1343
1338
|
if ('contextInfo' in key && !!key.contextInfo) {
|
|
1344
|
-
key.contextInfo =
|
|
1339
|
+
key.contextInfo.isGroupStatus = message.groupStatus;
|
|
1345
1340
|
}
|
|
1346
1341
|
else if (key) {
|
|
1347
1342
|
key.contextInfo = {
|