mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 22:57:42 +00:00
fix: changing the way received timestamp handling happens
This commit is contained in:
@@ -52,7 +52,6 @@ object MessageReceiver {
|
||||
// will already be in the database but we don't want to treat the message as a duplicate. The isRetry flag is a simple workaround
|
||||
// for this issue.
|
||||
if (storage.isMessageDuplicated(envelope.timestamp, GroupUtil.doubleEncodeGroupID(envelope.source)) && !isRetry) throw Error.DuplicateMessage
|
||||
storage.addReceivedMessageTimestamp(envelope.timestamp)
|
||||
// Decrypt the contents
|
||||
val ciphertext = envelope.content ?: throw Error.NoData
|
||||
var plaintext: ByteArray? = null
|
||||
@@ -101,6 +100,7 @@ object MessageReceiver {
|
||||
}
|
||||
// Don't process the envelope any further if the message has been handled already
|
||||
if (storage.isMessageDuplicated(envelope.timestamp, sender!!) && !isRetry) throw Error.DuplicateMessage
|
||||
storage.addReceivedMessageTimestamp(envelope.timestamp)
|
||||
// Don't process the envelope any further if the sender is blocked
|
||||
if (isBlock(sender!!)) throw Error.SenderBlocked
|
||||
// Parse the proto
|
||||
|
Reference in New Issue
Block a user