Better relay handling.

This commit is contained in:
Moxie Marlinspike
2014-01-06 14:37:51 -08:00
parent fde8d32848
commit 7e926d08ac
@@ -151,7 +151,7 @@ public class PushServiceSocket {
public PreKeyEntity getPreKey(PushDestination destination) throws IOException {
String path = String.format(PREKEY_PATH, destination.getNumber());
if (destination.getRelay() != null) {
if (!Util.isEmpty(destination.getRelay())) {
path = path + "?relay=" + destination.getRelay();
}
@@ -179,7 +179,7 @@ public class PushServiceSocket {
public File retrieveAttachment(String relay, long attachmentId) throws IOException {
String path = String.format(ATTACHMENT_PATH, String.valueOf(attachmentId));
if (relay != null) {
if (!Util.isEmpty(relay)) {
path = path + "?relay=" + relay;
}