From 7e926d08ac2901a2cc7c7a5d79c6713d0232d966 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 19 Nov 2013 10:02:07 -0800 Subject: [PATCH] Better relay handling. --- .../org/whispersystems/textsecure/push/PushServiceSocket.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/org/whispersystems/textsecure/push/PushServiceSocket.java b/library/src/org/whispersystems/textsecure/push/PushServiceSocket.java index 85ba93d30e..bf83099aac 100644 --- a/library/src/org/whispersystems/textsecure/push/PushServiceSocket.java +++ b/library/src/org/whispersystems/textsecure/push/PushServiceSocket.java @@ -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; }