From 5b2caa0074912d2e67006b88508413c0ad72f971 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Sat, 19 Oct 2013 10:53:50 -0700 Subject: [PATCH] Make relay arguments consistent. --- .../org/whispersystems/textsecure/push/PushServiceSocket.java | 2 +- src/org/thoughtcrime/securesms/transport/PushTransport.java | 2 +- 2 files 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 f648ff2c44..5b3b3c1893 100644 --- a/library/src/org/whispersystems/textsecure/push/PushServiceSocket.java +++ b/library/src/org/whispersystems/textsecure/push/PushServiceSocket.java @@ -139,7 +139,7 @@ public class PushServiceSocket { makeRequest(String.format(PREKEY_PATH, ""), "PUT", PreKeyList.toJson(new PreKeyList(lastResortEntity, entities))); } - public PreKeyEntity getPreKey(String number, String relay) throws IOException { + public PreKeyEntity getPreKey(String relay, String number) throws IOException { String path = String.format(PREKEY_PATH, number); if (relay != null) { diff --git a/src/org/thoughtcrime/securesms/transport/PushTransport.java b/src/org/thoughtcrime/securesms/transport/PushTransport.java index ed338d57b6..f8e3dfdbea 100644 --- a/src/org/thoughtcrime/securesms/transport/PushTransport.java +++ b/src/org/thoughtcrime/securesms/transport/PushTransport.java @@ -191,7 +191,7 @@ public class PushTransport extends BaseTransport { IdentityKeyPair identityKeyPair = IdentityKeyUtil.getIdentityKeyPair(context, masterSecret); IdentityKey identityKey = identityKeyPair.getPublicKey(); String relay = Directory.getInstance(context).getRelay(canonicalRecipientNumber); - PreKeyEntity preKey = socket.getPreKey(canonicalRecipientNumber, relay); + PreKeyEntity preKey = socket.getPreKey(relay, canonicalRecipientNumber); KeyExchangeProcessor processor = new KeyExchangeProcessor(context, masterSecret, recipient); processor.processKeyExchangeMessage(preKey);