Skip to content

Commit

Permalink
Improve some log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Mar 25, 2024
1 parent 51617d3 commit b57710a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/signalmeow/receiving.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,14 @@ func (cli *Client) incomingAPIMessageHandler(ctx context.Context, req *signalpb.
log.Trace().Msg("SealedSender messageType is CiphertextMessageTypePreKey")
result, err = cli.prekeyDecrypt(ctx, destinationServiceID, senderAddress, usmcContents)
if err != nil {
log.Err(err).Msg("prekeyDecrypt error")
log.Err(err).Msg("Sealed sender prekey ciphertext decryption error")
}

case libsignalgo.CiphertextMessageTypeWhisper:
log.Trace().Msg("SealedSender messageType is CiphertextMessageTypeWhisper")
message, err := libsignalgo.DeserializeMessage(usmcContents)
if err != nil {
log.Err(err).Msg("DeserializeMessage error")
log.Err(err).Msg("Sealed sender whisper deserialize error")
}
decryptedText, err := libsignalgo.Decrypt(
ctx,
Expand All @@ -400,7 +400,7 @@ func (cli *Client) incomingAPIMessageHandler(ctx context.Context, req *signalpb.
cli.Store.IdentityStore,
)
if err != nil {
log.Err(err).Msg("Sealed sender Whisper Decryption error")
log.Err(err).Msg("Sealed sender whisper decryption error")
} else {
err = stripPadding(&decryptedText)
if err != nil {
Expand Down Expand Up @@ -479,12 +479,12 @@ func (cli *Client) incomingAPIMessageHandler(ctx context.Context, req *signalpb.
}
result, err = cli.prekeyDecrypt(ctx, destinationServiceID, sender, envelope.Content)
if err != nil {
log.Err(err).Msg("prekeyDecrypt error")
log.Err(err).Msg("Prekey bundle decryption error")
} else {
log.Trace().
Any("sender_address", result.SenderAddress).
Any("content", result.Content).
Msg("prekey decrypt result")
Msg("Prekey bundle decryption result")
}

case signalpb.Envelope_PLAINTEXT_CONTENT:
Expand Down

0 comments on commit b57710a

Please sign in to comment.