@periskope/baileys 6.7.18-17-21 → 6.7.18-17-22

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.
@@ -134,6 +134,13 @@ const makeMessagesRecvSocket = (config) => {
134
134
  if (retryCount >= maxMsgRetryCount) {
135
135
  logger.warn({ retryCount, msgId }, 'reached maximum retry limit (5), not sending more retry receipts');
136
136
  msgRetryCache.del(key);
137
+ // Create a CIPHERTEXT stub message when retry limit is reached and upsert it
138
+ const msg = fullMessage;
139
+ msg.messageStubType = WAProto_1.proto.WebMessageInfo.StubType.CIPHERTEXT;
140
+ msg.messageStubParameters = ['Decryption failed after retries'];
141
+ (0, Utils_1.cleanMessage)(msg, authState.creds.me.id);
142
+ await sendMessageAck(node);
143
+ await upsertMessage(msg, node.attrs.offline ? 'append' : 'notify');
137
144
  return;
138
145
  }
139
146
  retryCount += 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/baileys",
3
- "version": "6.7.18-17-21",
3
+ "version": "6.7.18-17-22",
4
4
  "description": "WhatsApp API",
5
5
  "keywords": [
6
6
  "periskope",