mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 05:42:11 +00:00
downgrade duplicated error message and fixing new upload of message
This commit is contained in:
parent
e8d8e8b160
commit
3c91f99008
2 changed files with 12 additions and 2 deletions
|
|
@ -226,11 +226,15 @@ Future<(EncryptedContent?, PlaintextContent?)> handleEncryptedMessageRaw(
|
||||||
);
|
);
|
||||||
|
|
||||||
if (encryptedContent == null) {
|
if (encryptedContent == null) {
|
||||||
|
if (decryptionErrorType == null) {
|
||||||
|
// Duplicate message
|
||||||
|
return (null, null);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
null,
|
null,
|
||||||
PlaintextContent()
|
PlaintextContent()
|
||||||
..decryptionErrorMessage = (PlaintextContent_DecryptionErrorMessage()
|
..decryptionErrorMessage = (PlaintextContent_DecryptionErrorMessage()
|
||||||
..type = decryptionErrorType!),
|
..type = decryptionErrorType),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,13 @@ signalDecryptMessage(
|
||||||
return (EncryptedContent.fromBuffer(plaintext), null);
|
return (EncryptedContent.fromBuffer(plaintext), null);
|
||||||
} on InvalidKeyIdException catch (e) {
|
} on InvalidKeyIdException catch (e) {
|
||||||
Log.warn(e);
|
Log.warn(e);
|
||||||
return (null, PlaintextContent_DecryptionErrorMessage_Type.PREKEY_UNKNOWN);
|
return (
|
||||||
|
null,
|
||||||
|
PlaintextContent_DecryptionErrorMessage_Type.PREKEY_UNKNOWN,
|
||||||
|
);
|
||||||
|
} on DuplicateMessageException catch (e) {
|
||||||
|
Log.info(e.toString());
|
||||||
|
return (null, null);
|
||||||
} on InvalidMessageException catch (e) {
|
} on InvalidMessageException catch (e) {
|
||||||
if (!resyncedUsers.contains(fromUserId)) {
|
if (!resyncedUsers.contains(fromUserId)) {
|
||||||
if (await handleSessionResync(fromUserId)) {
|
if (await handleSessionResync(fromUserId)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue