mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-27 14:47:59 +01:00
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:
parent
3a3e784a70
commit
6bb444fdaf
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue