From 5273e6c73d4db59077b7822ed0d85d4bc0b58819 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Tue, 5 Dec 2006 18:07:35 +0000 Subject: [PATCH] Improved logic to find correct chat. If search for threadID fails then fallback to sender of message. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@6319 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/ChatManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/org/jivesoftware/smack/ChatManager.java b/source/org/jivesoftware/smack/ChatManager.java index 20f9969b7..d45502685 100644 --- a/source/org/jivesoftware/smack/ChatManager.java +++ b/source/org/jivesoftware/smack/ChatManager.java @@ -106,6 +106,10 @@ public class ChatManager { } else { chat = getThreadChat(message.getThread()); + if (chat == null) { + // Try to locate the chat based on the sender of the message + chat = getUserChat(StringUtils.parseBareAddress(message.getFrom())); + } } if(chat == null) {