sanka-baileyss 1.9.2 → 1.9.4

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.
@@ -350,7 +350,7 @@ const participantS = WABinary_1.getBinaryNodeChildren(child, 'participant').map(
350
350
  msg.messageStubType = Types_1.WAMessageStubType[stubtype]
351
351
  msg.messageStubParameters = participantS
352
352
  break
353
- case 'created_sub_group_suggestion':
353
+ case 'created_sub_group_suggestion':
354
354
  msg.messageStubType = Types_1.WAMessageStubType.SUGGESTED_SUBGROUP_ANNOUNCE
355
355
  msg.messageStubParameters = [participantJid, 'add']
356
356
  break
@@ -777,6 +777,7 @@ if (placeholderResendCache.get(node.attrs.id)) {
777
777
  placeholderResendCache.del(node.attrs.id)
778
778
  }
779
779
  }
780
+
780
781
  const { fullMessage: msg, category, author, decrypt } = Utils_1.decryptMessageNode(node, authState.creds.me.id, authState.creds.me.lid || '', signalRepository, logger)
781
782
  if (response && msg?.messageStubParameters?.[0] === Utils_1.NO_MESSAGE_FOUND_ERROR_TEXT) {
782
783
  msg.messageStubParameters = [Utils_1.NO_MESSAGE_FOUND_ERROR_TEXT, response]
@@ -786,7 +787,7 @@ ev.emit('chats.phoneNumberShare', { lid: node.attrs.from, jid: node.attrs.sender
786
787
  }
787
788
  await Promise.all([
788
789
  processingMutex.mutex(async () => {
789
- await decrypt()
790
+ await decrypt()
790
791
  if (msg.messageStubType === WAProto_1.proto.WebMessageInfo.StubType.CIPHERTEXT) {
791
792
  if (msg?.messageStubParameters?.[0] === Utils_1.MISSING_KEYS_ERROR_TEXT) {
792
793
  return sendMessageAck(node, Utils_1.NACK_REASONS.ParsingError)
@@ -810,7 +811,7 @@ logger.debug({ node }, 'connection closed, ignoring retry req')
810
811
  else {
811
812
  let type = undefined
812
813
  let participant = msg.key.participant
813
- if (category === 'peer') {
814
+ if (category === 'peer') {
814
815
  type = 'peer_msg'
815
816
  }
816
817
  else if (msg.key.fromMe) {
@@ -841,7 +842,7 @@ await upsertMessage(msg, node.attrs.offline ? 'append' : 'notify')
841
842
  catch (error) {
842
843
  logger.error({ error, node: JSON.stringify(node) }, 'CRITICAL: error in handling message')
843
844
  if (node.attrs.id && node.attrs.from) {
844
- await sendMessageAck(node, 500)
845
+ await sendMessageAck(node, 500)
845
846
  }
846
847
  }
847
848
  }
@@ -896,7 +897,7 @@ const { attrs } = node
896
897
  const [infoChild] = WABinary_1.getAllBinaryNodeChildren(node)
897
898
  const callId = infoChild.attrs['call-id']
898
899
  const from = infoChild.attrs.from || infoChild.attrs['call-creator']
899
- const status = Utils_1.getCallStatusFromNode(infoChild)
900
+ const status =  Utils_1.getCallStatusFromNode(infoChild)
900
901
  const call = {
901
902
  chatId: attrs.from,
902
903
  from,
@@ -931,13 +932,13 @@ const key = { remoteJid: attrs.from, fromMe: true, id: attrs.id, newsletter_serv
931
932
  // // it means -- the message hasn't reached all devices yet
932
933
  // // we'll retry sending the message here
933
934
  // if(attrs.phash) {
934
- // logger.info({ attrs }, 'received phash in ack, resending message...')
935
- // const msg = await getMessage(key)
936
- // if(msg) {
937
- // await relayMessage(key.remoteJid!, msg, { messageId: key.id!, useUserDevicesCache: false })
938
- // } else {
939
- // logger.warn({ attrs }, 'could not send message again, as it was not found')
940
- // }
935
+ //  logger.info({ attrs }, 'received phash in ack, resending message...')
936
+ //  const msg = await getMessage(key)
937
+ //  if(msg) {
938
+ //      await relayMessage(key.remoteJid!, msg, { messageId: key.id!, useUserDevicesCache: false })
939
+ //  } else {
940
+ //      logger.warn({ attrs }, 'could not send message again, as it was not found')
941
+ //  }
941
942
  // }
942
943
  // error in acknowledgement,
943
944
  // device could not display the message
@@ -969,7 +970,7 @@ return exec(node, false)
969
970
  }
970
971
  const makeOfflineNodeProcessor = () => {
971
972
  const nodeProcessorMap = new Map([
972
- ['message', handleMessage],
973
+ ['message', ],
973
974
  ['call', handleCall],
974
975
  ['receipt', handleReceipt],
975
976
  ['notification', handleNotification]