Fix issue with previously-enqueued bad encrypted messages.
This commit is contained in:
parent
417d5a2804
commit
562e608e1f
1 changed files with 8 additions and 0 deletions
|
@ -497,6 +497,12 @@ public final class PushProcessMessageJob extends BaseJob {
|
||||||
handleUnsupportedDataMessage(e.sender, e.senderDevice, Optional.fromNullable(e.groupId), timestamp, smsMessageId);
|
handleUnsupportedDataMessage(e.sender, e.senderDevice, Optional.fromNullable(e.groupId), timestamp, smsMessageId);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CORRUPT_MESSAGE:
|
||||||
|
case NO_SESSION:
|
||||||
|
warn(TAG, String.valueOf(timestamp), "Discovered old enqueued bad encrypted message. Scheduling reset.");
|
||||||
|
ApplicationDependencies.getJobManager().add(new AutomaticSessionResetJob(Recipient.external(context, e.sender).getId(), e.senderDevice, timestamp));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new AssertionError("Not handled " + messageState + ". (" + timestamp + ")");
|
throw new AssertionError("Not handled " + messageState + ". (" + timestamp + ")");
|
||||||
}
|
}
|
||||||
|
@ -2022,6 +2028,8 @@ public final class PushProcessMessageJob extends BaseJob {
|
||||||
public enum MessageState {
|
public enum MessageState {
|
||||||
DECRYPTED_OK,
|
DECRYPTED_OK,
|
||||||
INVALID_VERSION,
|
INVALID_VERSION,
|
||||||
|
CORRUPT_MESSAGE, // Not used, but can't remove due to serialization
|
||||||
|
NO_SESSION, // Not used, but can't remove due to serialization
|
||||||
LEGACY_MESSAGE,
|
LEGACY_MESSAGE,
|
||||||
DUPLICATE_MESSAGE,
|
DUPLICATE_MESSAGE,
|
||||||
UNSUPPORTED_DATA_MESSAGE
|
UNSUPPORTED_DATA_MESSAGE
|
||||||
|
|
Loading…
Add table
Reference in a new issue