in our application we send and receives messages with type=“normal”. The purpose of these messages is obviously not to use in a chat window, but to use them to transport PacketExtensions for other purposes.
We use messages, because they also need to be stored by Openfire in case the recipient is offline.
We also want to use a different Thread ID for these messages to keep track of associated messages.
However, the ChatManager listens for all messages with type=“chat” AND type=“normal”. That means it listens to our “normal” messages and assigns a Chat to them. When the user has used the chat, a chat object is created for the user.
Now, when a normal message arrives, it can’t find a ThreadChat (due to different thread id), so it takes the next best available according to the user.
Later in the Chat class, the deliver method overrides the thread id with the one for the chat.
This is problematic for us, because we cannot differentiate messages by their thread id anymore.
In my opinion, the ChatManager should only listen for messages of type=“chat”. This would fix our problem and makes semantically more sense. The Chat#sendMessage methods also set the type “chat”.
Do you have any opinions about that?
Is there any chance, this will get fixed any time soon, if at all?
It would be just adjusting the PacketFilter in ChatManager.java in line 104.