Updated iOS message delivery.

1) Use WebSockets for delivery if a client is connected.

2) If a client isn't connected, write to a redis queue and send
   an APN push.
This commit is contained in:
Moxie Marlinspike
2014-05-07 17:21:07 -07:00
parent b433b9c879
commit 7a33cef27e
11 changed files with 272 additions and 157 deletions

View File

@@ -23,7 +23,6 @@ import com.google.android.gcm.server.Constants;
import com.google.android.gcm.server.Message;
import com.google.android.gcm.server.Result;
import com.google.android.gcm.server.Sender;
import org.whispersystems.textsecuregcm.entities.CryptoEncodingException;
import org.whispersystems.textsecuregcm.entities.EncryptedOutgoingMessage;
import java.io.IOException;
@@ -65,8 +64,6 @@ public class GCMSender {
}
} catch (IOException e) {
throw new TransientPushFailureException(e);
} catch (CryptoEncodingException e) {
throw new NotPushRegisteredException(e);
}
}
}