mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 00:08:39 +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);
|
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
|
||||||
|
Reference in New Issue
Block a user