mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
WIP: received message timestamps
This commit is contained in:
parent
5cbbf92fb9
commit
5dadb89225
@ -308,6 +308,10 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun removeReceivedMessageTimestamps(timestamps: Set<Long>) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun getMessageIdInDatabase(timestamp: Long, author: String): Long? {
|
||||
val database = DatabaseFactory.getMmsSmsDatabase(context)
|
||||
val address = Address.fromSerialized(author)
|
||||
|
@ -88,6 +88,7 @@ interface StorageProtocol {
|
||||
// Message Handling
|
||||
fun getReceivedMessageTimestamps(): Set<Long>
|
||||
fun addReceivedMessageTimestamp(timestamp: Long)
|
||||
fun removeReceivedMessageTimestamps(timestamps: Set<Long>)
|
||||
// Returns the IDs of the saved attachments.
|
||||
fun persistAttachments(messageId: Long, attachments: List<Attachment>): List<Long>
|
||||
|
||||
|
@ -63,7 +63,7 @@ object MessageReceiver {
|
||||
} else {
|
||||
when (envelope.type) {
|
||||
SignalServiceProtos.Envelope.Type.UNIDENTIFIED_SENDER -> {
|
||||
val userX25519KeyPair = MessagingConfiguration.shared.storage.getUserX25519KeyPair() ?: throw Error.NoUserX25519KeyPair
|
||||
val userX25519KeyPair = MessagingConfiguration.shared.storage.getUserX25519KeyPair()
|
||||
val decryptionResult = MessageReceiverDecryption.decryptWithSessionProtocol(ciphertext.toByteArray(), userX25519KeyPair)
|
||||
plaintext = decryptionResult.first
|
||||
sender = decryptionResult.second
|
||||
|
Loading…
Reference in New Issue
Block a user