Commit d83b87a5 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Only ignore IQ result packets sent to the room itself. IQ result packets sent...

Only ignore IQ result packets sent to the room itself. IQ result packets sent between room occupants should be processed.

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@3039 b35dd754-fafc-0310-a699-88a17e54d16e
parent b475915b
......@@ -285,7 +285,7 @@ public class MUCUserImpl implements MUCUser {
public void process(IQ packet) {
// Ignore IQs of type ERROR or RESULT sent to a room
if (IQ.Type.error == packet.getType() || IQ.Type.result == packet.getType()) {
if (IQ.Type.error == packet.getType()) {
return;
}
lastPacketTime = System.currentTimeMillis();
......@@ -303,6 +303,19 @@ public class MUCUserImpl implements MUCUser {
// TODO: send error message to user (can't send packets to group you haven't
// joined)
}
else if (IQ.Type.result == packet.getType()) {
// Only process IQ result packet if it's a private packet sent to another
// room occupant
if (packet.getTo().getResource() != null) {
try {
// User is sending an IQ result packet to another room occupant
role.getChatRoom().sendPrivatePacket(packet, role);
}
catch (NotFoundException e) {
// Do nothing. No error will be sent to the sender of the IQ result packet
}
}
}
else {
// Check and reject conflicting packets with conflicting roles
// In other words, another user already has this nickname
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment