From 7d7da7a39356890a663eea993e4fcaefc8a28066 Mon Sep 17 00:00:00 2001 From: Ingo Bauersachs Date: Sat, 14 Jan 2017 22:36:00 +0100 Subject: Fix last message edit impersonation Closes #299 --- .../sip/communicator/impl/gui/main/chat/ChatConversationPanel.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java index 127e28b..0283e25 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java @@ -790,8 +790,6 @@ public class ChatConversationPanel */ public void correctMessage(final ChatMessage chatMessage) { - lastMessageUID = chatMessage.getMessageUID(); - if (!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() @@ -805,6 +803,11 @@ public class ChatConversationPanel } String correctedUID = chatMessage.getCorrectedMessageUID(); + if (correctedUID != null && correctedUID.equals(lastMessageUID)) + { + lastMessageUID = chatMessage.getMessageUID(); + } + Element root = document.getDefaultRootElement(); Element correctedMsgElement = document.getElement(root, -- cgit v1.1