Skip to content
Snippets Groups Projects
Commit 39ded013 authored by William Enright's avatar William Enright Committed by Larbi Gharib
Browse files

Fixed public nameserver address lookups returning json

Change-Id: I6f350c89448999e126c2f294bcdfad2ab595a842
parent d307f3e7
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,8 @@ import lombok.extern.slf4j.Slf4j;
import net.jami.jams.common.jami.NameLookupResponse;
import net.jami.jams.common.jami.NameRegistrationRequest;
import net.jami.jams.common.jami.NameServer;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import java.net.HttpURLConnection;
import java.net.URL;
......@@ -96,7 +98,9 @@ public class PublicNameServer implements NameServer {
currentSize++;
}
log.info("Response received from public nameserver {} ",responseData.toString());
return responseData.toString();
JSONParser parser = new JSONParser();
JSONObject json = (JSONObject) parser.parse(responseData.toString());
return json.getAsString("name");
}
return null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment