mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-10-14 03:20:46 -04:00
add system message only once when dispute is opened
This commit is contained in:
parent
457518e3a9
commit
6d17c9f44c
1 changed files with 18 additions and 14 deletions
|
@ -430,20 +430,24 @@ public abstract class DisputeManager<T extends DisputeList<Dispute>> extends Sup
|
||||||
// save state
|
// save state
|
||||||
persistNow(null);
|
persistNow(null);
|
||||||
|
|
||||||
String disputeInfo = getDisputeInfo(dispute);
|
// add dispute system message once
|
||||||
String sysMsg = dispute.isSupportTicket() ?
|
boolean hasSystemMessage = dispute.getChatMessages().stream().anyMatch(ChatMessage::isSystemMessage);
|
||||||
Res.get("support.youOpenedTicket", disputeInfo, Version.VERSION) :
|
if (!hasSystemMessage) {
|
||||||
Res.get("support.youOpenedDispute", disputeInfo, Version.VERSION);
|
String disputeInfo = getDisputeInfo(dispute);
|
||||||
|
String sysMsg = dispute.isSupportTicket() ?
|
||||||
ChatMessage chatMessage = new ChatMessage(
|
Res.get("support.youOpenedTicket", disputeInfo, Version.VERSION) :
|
||||||
getSupportType(),
|
Res.get("support.youOpenedDispute", disputeInfo, Version.VERSION);
|
||||||
dispute.getTradeId(),
|
ChatMessage chatMessage = new ChatMessage(
|
||||||
keyRing.getPubKeyRing().hashCode(),
|
getSupportType(),
|
||||||
false,
|
dispute.getTradeId(),
|
||||||
Res.get("support.systemMsg", sysMsg),
|
keyRing.getPubKeyRing().hashCode(),
|
||||||
p2PService.getAddress());
|
false,
|
||||||
chatMessage.setSystemMessage(true);
|
Res.get("support.systemMsg", sysMsg),
|
||||||
dispute.addAndPersistChatMessage(chatMessage);
|
p2PService.getAddress());
|
||||||
|
chatMessage.setSystemMessage(true);
|
||||||
|
dispute.addAndPersistChatMessage(chatMessage);
|
||||||
|
}
|
||||||
|
ChatMessage chatMessage = dispute.getChatMessages().get(dispute.getChatMessages().size() - 1); // last message // TODO: why can't this be assigned to local variable above?
|
||||||
|
|
||||||
// try to import latest multisig info
|
// try to import latest multisig info
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue