I don’'t have access to the “receiver” variable but I bet that it contains a bare JID rather than a full JID. When a message is sent to a bare JID then the server will forward the message to the “best” resource that the target user is using. However, IQ packets sent to bare JIDs are being handled by the server itself. If you want an IQ packet to be delivered to a client then you should send it to the full JID of the user (i.e. includes the resource).