Ignore envelopes with unknown type

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2015-10-29 09:06:28 -07:00
parent 339d352d6e
commit 751fa21f60

View File

@ -31,8 +31,13 @@ public abstract class PushReceivedJob extends ContextJob {
directory.setNumber(contactTokenDetails, true); directory.setNumber(contactTokenDetails, true);
} }
if (envelope.isReceipt()) handleReceipt(envelope); if (envelope.isReceipt()) {
else handleMessage(envelope, sendExplicitReceipt); handleReceipt(envelope);
} else if (envelope.isPreKeyWhisperMessage() || envelope.isWhisperMessage()) {
handleMessage(envelope, sendExplicitReceipt);
} else {
Log.w(TAG, "Received envelope of unknown type: " + envelope.getType());
}
} }
private void handleMessage(TextSecureEnvelope envelope, boolean sendExplicitReceipt) { private void handleMessage(TextSecureEnvelope envelope, boolean sendExplicitReceipt) {