From 03a703b183399301787c2e41e9a6e22cddd0fd82 Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 20 Aug 2023 12:04:46 -0400 Subject: [PATCH] fix missing dispute summary text by creating new chat message if empty --- .../java/haveno/core/support/dispute/DisputeManager.java | 6 +++--- .../support/dispute/arbitration/ArbitrationManager.java | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/haveno/core/support/dispute/DisputeManager.java b/core/src/main/java/haveno/core/support/dispute/DisputeManager.java index e6c0566f37..b994853021 100644 --- a/core/src/main/java/haveno/core/support/dispute/DisputeManager.java +++ b/core/src/main/java/haveno/core/support/dispute/DisputeManager.java @@ -719,8 +719,8 @@ public abstract class DisputeManager> extends Sup if (trade == null) throw new RuntimeException("Dispute trade " + dispute.getTradeId() + " does not exist"); // persist result in dispute's chat message once - boolean resending = disputeResult.getChatMessage() != null; - if (!resending) { + boolean exists = disputeResult.getChatMessage() != null && disputeResult.getChatMessage().getMessage() != null && !disputeResult.getChatMessage().getMessage().isEmpty(); + if (!exists) { ChatMessage chatMessage = new ChatMessage( getSupportType(), dispute.getTradeId(), @@ -742,7 +742,7 @@ public abstract class DisputeManager> extends Sup MoneroTxWallet unsignedPayoutTx = receiver.getUpdatedMultisigHex() == null ? null : trade.getProcessModel().getUnsignedPayoutTx(); String unsignedPayoutTxHex = unsignedPayoutTx == null ? null : unsignedPayoutTx.getTxSet().getMultisigTxHex(); TradePeer receiverPeer = receiver == trade.getBuyer() ? trade.getSeller() : trade.getBuyer(); - boolean deferPublishPayout = !resending && unsignedPayoutTxHex != null && receiverPeer.getUpdatedMultisigHex() != null && trade.getDisputeState().ordinal() >= Trade.DisputeState.ARBITRATOR_SAW_ARRIVED_DISPUTE_CLOSED_MSG.ordinal() ; + boolean deferPublishPayout = !exists && unsignedPayoutTxHex != null && receiverPeer.getUpdatedMultisigHex() != null && trade.getDisputeState().ordinal() >= Trade.DisputeState.ARBITRATOR_SAW_ARRIVED_DISPUTE_CLOSED_MSG.ordinal(); DisputeClosedMessage disputeClosedMessage = new DisputeClosedMessage(disputeResult, p2PService.getAddress(), UUID.randomUUID().toString(), diff --git a/core/src/main/java/haveno/core/support/dispute/arbitration/ArbitrationManager.java b/core/src/main/java/haveno/core/support/dispute/arbitration/ArbitrationManager.java index eefca0106e..ee8c41c2f2 100644 --- a/core/src/main/java/haveno/core/support/dispute/arbitration/ArbitrationManager.java +++ b/core/src/main/java/haveno/core/support/dispute/arbitration/ArbitrationManager.java @@ -219,6 +219,7 @@ public final class ArbitrationManager extends DisputeManager