I want to send an iq packet back to the user after their session is created. I am using the following code in the sessionCreated function of the SessionEventListener.
JID user = session.getAddress();
XMPPServer server = XMPPServer.getInstance();
IQRouter iqRouter = XMPPServer.getInstance().getIQRouter();
IQ iqPacket = new IQ(IQ.Type.set);
//more code here to add elements
I can see the packet in the openfire logs being sent to the correct user. But the spark client does not receive it. I have written a plugin for spark that dumps all packets to the log file so I can tell if it gets there or not. Other packets do but this one does not.