@queenanya/baileys 8.2.6-beta → 8.2.7-beta

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.
@@ -112,6 +112,7 @@ const makeMessagesSocket = (config) => {
112
112
  };
113
113
  /** Fetch all the devices we've to send a message to */
114
114
  const getUSyncDevices = async (jids, useCache, ignoreZeroDevices) => {
115
+ var _a;
115
116
  const deviceResults = [];
116
117
  if (!useCache) {
117
118
  logger.debug('not using cache for devices');
@@ -119,12 +120,7 @@ const makeMessagesSocket = (config) => {
119
120
  const toFetch = [];
120
121
  jids = Array.from(new Set(jids));
121
122
  for (let jid of jids) {
122
- const decoded = (0, WABinary_1.jidDecode)(jid);
123
- if (!decoded || !decoded.user) {
124
- logger.warn(`Failed to decode or extract user from JID: ${jid}`);
125
- continue; // skip if invalid
126
- }
127
- const user = decoded.user;
123
+ const user = (_a = (0, WABinary_1.jidDecode)(jid)) === null || _a === void 0 ? void 0 : _a.user;
128
124
  jid = (0, WABinary_1.jidNormalizedUser)(jid);
129
125
  if (useCache) {
130
126
  const devices = userDevicesCache.get(user);
@@ -160,6 +156,7 @@ const makeMessagesSocket = (config) => {
160
156
  userDevicesCache.set(key, deviceMap[key]);
161
157
  }
162
158
  }
159
+ logger.debug(deviceResults);
163
160
  return deviceResults;
164
161
  };
165
162
  const assertSessions = async (jids, force) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@queenanya/baileys",
3
- "version": "8.2.6-beta",
3
+ "version": "8.2.7-beta",
4
4
  "description": "Custom Baileys WhatsApp API",
5
5
  "keywords": [
6
6
  "baileys",