I was looking through the Spark message processing code and stumbled on this snippet:
// If the message is not from the current agent. Append to chat.
if (message.getBody() != null) {
if (!participantJID.equals(message.getFrom())) {
// Create new Chat Object.
participantJID = message.getFrom();
}
participantJID = message.getFrom();
insertMessage(message);
showTyping(false);
}
The if (!participantJID.equals(message.getFrom())) conditional appears to be there to create a new Chat (per the comment), but no chat is created. In fact, the conditional does nothing more than the first line outside the if statement.
Not sure if this is a bug or not, but it seemed odd so I figured I’'d let you know.
Cheers,
Dan