chore: log full decrypt trace

This commit is contained in:
Adhiraj Singh
2023-03-18 17:40:11 +05:30
parent 5a3ef65e50
commit 5b2b037c76
2 changed files with 11 additions and 8 deletions

View File

@@ -547,7 +547,8 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
const { fullMessage: msg, category, author, decrypt } = decryptMessageNode(
node,
authState.creds.me!.id,
signalRepository
signalRepository,
logger,
)
if(shouldIgnoreJid(msg.key.remoteJid!)) {
logger.debug({ key: msg.key }, 'ignored message')
@@ -561,10 +562,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
await decrypt()
// message failed to decrypt
if(msg.messageStubType === proto.WebMessageInfo.StubType.CIPHERTEXT) {
logger.error(
{ key: msg.key, params: msg.messageStubParameters },
'failure in decrypting message'
)
retryMutex.mutex(
async() => {
if(ws.readyState === ws.OPEN) {