Improve decryption error logging

This commit is contained in:
AsamK 2022-02-12 11:17:44 +01:00
parent b0bb602eb5
commit 0e0ef402fc
2 changed files with 7 additions and 3 deletions

View file

@ -2,8 +2,6 @@ package org.asamk.signal.manager.helper;
import org.asamk.signal.manager.Manager;
import org.asamk.signal.manager.SignalDependencies;
import org.asamk.signal.manager.api.TrustLevel;
import org.asamk.signal.manager.api.UntrustedIdentityException;
import org.asamk.signal.manager.actions.HandleAction;
import org.asamk.signal.manager.actions.RefreshPreKeysAction;
import org.asamk.signal.manager.actions.RenewSessionAction;
@ -22,6 +20,8 @@ import org.asamk.signal.manager.actions.SendSyncKeysAction;
import org.asamk.signal.manager.api.MessageEnvelope;
import org.asamk.signal.manager.api.Pair;
import org.asamk.signal.manager.api.StickerPackId;
import org.asamk.signal.manager.api.TrustLevel;
import org.asamk.signal.manager.api.UntrustedIdentityException;
import org.asamk.signal.manager.groups.GroupId;
import org.asamk.signal.manager.groups.GroupNotFoundException;
import org.asamk.signal.manager.groups.GroupUtils;
@ -228,7 +228,10 @@ public final class IncomingMessageHandler {
if (content.getDecryptionErrorMessage().isPresent()) {
var message = content.getDecryptionErrorMessage().get();
logger.debug("Received a decryption error message (resend request for {})", message.getTimestamp());
logger.debug("Received a decryption error message from {}.{} (resend request for {})",
sender,
senderDeviceId,
message.getTimestamp());
if (message.getDeviceId() == account.getDeviceId()) {
handleDecryptionErrorMessage(actions, sender, senderDeviceId, message);
} else {

View file

@ -213,6 +213,7 @@ public class SendHelper {
public SendMessageResult resendMessage(
final RecipientId recipientId, final long timestamp, final MessageSendLogEntry messageSendLogEntry
) {
logger.trace("Resending message {} to {}", timestamp, recipientId);
if (messageSendLogEntry.groupId().isEmpty()) {
return handleSendMessage(recipientId,
(messageSender, address, unidentifiedAccess) -> messageSender.resendContent(address,