@neelegirly/baileys 2.2.28 → 2.2.29

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.
@@ -929,6 +929,18 @@ const makeMessagesRecvSocket = (config) => {
929
929
  ) {
930
930
  const deviceJids = devices.map((d) => d.attrs.jid);
931
931
  logger.info({ deviceJids }, "got my own devices");
932
+ } else if (child.attrs.jid) {
933
+ // OniSelf fork fix: a CONTACT changed devices. Force-refresh their
934
+ // device list (bypass the 5-min USER_DEVICES cache) so the next send
935
+ // reaches the new/changed device immediately instead of leaving it on
936
+ // WhatsApp's "Waiting for this message" until the cache expires.
937
+ // Benign + fail-safe: worst case is one extra usync query.
938
+ try {
939
+ await getUSyncDevices([child.attrs.jid], false, false);
940
+ logger.info({ jid: child.attrs.jid }, "refreshed contact devices after change");
941
+ } catch (e) {
942
+ logger.debug({ e }, "contact device refresh failed (non-fatal)");
943
+ }
932
944
  }
933
945
  break;
934
946
  case "server_sync":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neelegirly/baileys",
3
- "version": "2.2.28",
3
+ "version": "2.2.29",
4
4
  "description": "Neelegirly fork of Baileys: multi-device WhatsApp Web API for Node.js",
5
5
  "keywords": [
6
6
  "whatsapp",