sanka-baileyss 2.2.4 → 2.2.5
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/Socket/groups.js +13 -0
- package/package.json +1 -1
package/lib/Socket/groups.js
CHANGED
|
@@ -317,6 +317,18 @@ const extractGroupMetadata = (result) => {
|
|
|
317
317
|
const isUserJid = WABinary_1.isJidUser(attrs.jid);
|
|
318
318
|
const isLidJid = WABinary_1.isLidUser && WABinary_1.isLidUser(attrs.jid); // Soporte condicional para LID
|
|
319
319
|
|
|
320
|
+
return {
|
|
321
|
+
id: attrs.jid,
|
|
322
|
+
jid: (0, WABinary_1.isJidUser)(attrs.jid)
|
|
323
|
+
? attrs.jid
|
|
324
|
+
: (attrs.phone_number ? (0, WABinary_1.jidNormalizedUser)(attrs.phone_number) : undefined),
|
|
325
|
+
lid: typeof WABinary_1.isLidUser === 'function' && (0, WABinary_1.isLidUser)(attrs.jid)
|
|
326
|
+
? attrs.jid
|
|
327
|
+
: attrs.lid,
|
|
328
|
+
admin: attrs.type || null,
|
|
329
|
+
};
|
|
330
|
+
});
|
|
331
|
+
/*
|
|
320
332
|
return {
|
|
321
333
|
id: attrs.jid,
|
|
322
334
|
jid: isUserJid ? attrs.jid : (attrs.phone_number ? WABinary_1.jidNormalizedUser(attrs.phone_number) : undefined),
|
|
@@ -324,6 +336,7 @@ const extractGroupMetadata = (result) => {
|
|
|
324
336
|
admin: (attrs.type || null),
|
|
325
337
|
};
|
|
326
338
|
});
|
|
339
|
+
*/
|
|
327
340
|
|
|
328
341
|
const metadata = {
|
|
329
342
|
id: groupId,
|