Ignore envelopes with unknown type

// FREEBIE
pull/1/head
Moxie Marlinspike 10 years ago
parent 339d352d6e
commit 751fa21f60

@ -31,8 +31,13 @@ public abstract class PushReceivedJob extends ContextJob {
directory.setNumber(contactTokenDetails, true);
}
if (envelope.isReceipt()) handleReceipt(envelope);
else handleMessage(envelope, sendExplicitReceipt);
if (envelope.isReceipt()) {
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) {

Loading…
Cancel
Save