Commit c9279150 authored by guus's avatar guus

Things will be messed up when not having a 'to' address. Creating a deep-copy...

Things will be messed up when not having a 'to' address. Creating a deep-copy packet that'll include one (OF-462).

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@12530 b35dd754-fafc-0310-a699-88a17e54d16e
parent e3fdcb30
......@@ -397,15 +397,18 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider,
final String jidFrom = senderJID.toBareJID();
final PEPService pepService = pepServiceManager.getPEPService(jidFrom);
final IQ deepCopy = packet.createCopy();
deepCopy.setTo(jidFrom);
if (pepService != null) {
pepServiceManager.process(pepService, packet);
pepServiceManager.process(pepService, deepCopy);
} else {
// Process with PubSub using a dummyService. In the case where an IQ packet is sent to
// a user who does not have a PEP service, we wish to utilize the error reporting flow
// already present in the PubSubEngine. This gives the illusion that every user has a
// PEP service, as required by the specification.
PEPService dummyService = new PEPService(XMPPServer.getInstance(), senderJID.toBareJID());
pepServiceManager.process(dummyService, packet);
pepServiceManager.process(dummyService, deepCopy);
}
}
}
......
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