NULL thread IDs no longer an issue. SMACK-203

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7424 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Alex Wenckus 2007-03-09 17:27:20 +00:00 committed by alex
parent 3a3e784a70
commit 6bb444fdaf
1 changed files with 6 additions and 0 deletions

View File

@ -145,6 +145,9 @@ public class ChatManager {
* @return the created chat.
*/
public Chat createChat(String userJID, String thread, MessageListener listener) {
if(thread == null) {
thread = nextID();
}
Chat chat = threadChats.get(thread);
if(chat != null) {
throw new IllegalArgumentException("ThreadID is already used");
@ -168,6 +171,9 @@ public class ChatManager {
private Chat createChat(Message message) {
String threadID = message.getThread();
if(threadID == null) {
threadID = nextID();
}
String userJID = message.getFrom();
return createChat(userJID, threadID, false);