Refactor WebSocket support to use Redis for pubsub communication.

This commit is contained in:
Moxie Marlinspike
2014-01-24 12:33:40 -08:00
parent 519f982604
commit 7bb505db4c
19 changed files with 670 additions and 23 deletions

View File

@@ -62,7 +62,7 @@ public class PushSender {
if (device.getGcmId() != null) sendGcmMessage(account, device, message);
else if (device.getApnId() != null) sendApnMessage(account, device, message);
else if (device.getFetchesMessages()) storeFetchedMessage(device, message);
else if (device.getFetchesMessages()) storeFetchedMessage(account, device, message);
else throw new NotPushRegisteredException("No delivery possible!");
}
@@ -97,11 +97,11 @@ public class PushSender {
}
}
private void storeFetchedMessage(Device device, EncryptedOutgoingMessage outgoingMessage)
private void storeFetchedMessage(Account account, Device device, EncryptedOutgoingMessage outgoingMessage)
throws NotPushRegisteredException
{
try {
storedMessageManager.storeMessage(device, outgoingMessage);
storedMessageManager.storeMessage(account, device, outgoingMessage);
} catch (CryptoEncodingException e) {
throw new NotPushRegisteredException(e);
}