Hello together,
i have a MultiUserChat with the chance to open a private chat. If i open a private chat to a occupant of the conference, the chat get a threadId. The target chat user doesnt know this threadId. So how can i receive this message without opening a chat.
Currently i have following code:
connection.addPacketListener(this, new PacketTypeFilter(Packet.class));
...
@Override
public void processPacket(Packet packet) {
System.out.println("ENTER processPacket");
if (packet instanceof Message) {
Message msg = (Message) packet;
textarea.append(getNickname(msg.getFrom()) + ": " + msg.getBody() + "\n");
System.out.println("Message: " + msg.getFrom() + " " + msg.getBody());
}
}
With the smack debugger, i reveive the sent message, but with this packet listener not. So how can I receive a message, to create a chat with the right threadId.
thank you for your help