mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-25 15:37:32 +00:00
Fix issue with previously-enqueued bad encrypted messages.
This commit is contained in:
@@ -497,6 +497,12 @@ public final class PushProcessMessageJob extends BaseJob {
|
||||
handleUnsupportedDataMessage(e.sender, e.senderDevice, Optional.fromNullable(e.groupId), timestamp, smsMessageId);
|
||||
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:
|
||||
throw new AssertionError("Not handled " + messageState + ". (" + timestamp + ")");
|
||||
}
|
||||
@@ -2022,6 +2028,8 @@ public final class PushProcessMessageJob extends BaseJob {
|
||||
public enum MessageState {
|
||||
DECRYPTED_OK,
|
||||
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,
|
||||
DUPLICATE_MESSAGE,
|
||||
UNSUPPORTED_DATA_MESSAGE
|
||||
|
Reference in New Issue
Block a user