Commit a757d378 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Let GET packets have no username field.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1178 b35dd754-fafc-0310-a699-88a17e54d16e
parent b121d7dc
...@@ -102,7 +102,9 @@ public class IQAuthHandler extends IQHandler implements IQAuthInfo { ...@@ -102,7 +102,9 @@ public class IQAuthHandler extends IQHandler implements IQAuthInfo {
Element queryResponse = probeResponse.createCopy(); Element queryResponse = probeResponse.createCopy();
if (IQ.Type.get == packet.getType()) { if (IQ.Type.get == packet.getType()) {
String username = query.elementTextTrim("username"); String username = query.elementTextTrim("username");
queryResponse.element("username").setText(username); if (username != null) {
queryResponse.element("username").setText(username);
}
response = IQ.createResultIQ(packet); response = IQ.createResultIQ(packet);
response.setChildElement(queryResponse); response.setChildElement(queryResponse);
// This is a workaround. Since we don't want to have an incorrect TO attribute // This is a workaround. Since we don't want to have an incorrect TO attribute
......
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