mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 14:27:44 +00:00
feat: add removing of the sent/received messages
This commit is contained in:
@@ -95,7 +95,7 @@ interface StorageProtocol {
|
||||
fun isMessageDuplicated(timestamp: Long, sender: String): Boolean
|
||||
fun getReceivedMessageTimestamps(): Set<Long>
|
||||
fun addReceivedMessageTimestamp(timestamp: Long)
|
||||
// fun removeReceivedMessageTimestamps(timestamps: Set<Long>)
|
||||
fun removeReceivedMessageTimestamps(timestamps: Set<Long>)
|
||||
// Returns the IDs of the saved attachments.
|
||||
fun persistAttachments(messageId: Long, attachments: List<Attachment>): List<Long>
|
||||
fun getAttachmentsForMessage(messageId: Long): List<DatabaseAttachment>
|
||||
|
@@ -287,7 +287,7 @@ object MessageSender {
|
||||
val userPublicKey = storage.getUserPublicKey()!!
|
||||
val messageId = storage.getMessageIdInDatabase(message.sentTimestamp!!, message.sender?:userPublicKey) ?: return
|
||||
// Ignore future self-sends
|
||||
// storage.addReceivedMessageTimestamp(message.sentTimestamp!!)
|
||||
storage.addReceivedMessageTimestamp(message.sentTimestamp!!)
|
||||
// Track the open group server message ID
|
||||
if (message.openGroupServerMessageID != null && destination is Destination.OpenGroupV2) {
|
||||
val encoded = GroupUtil.getEncodedOpenGroupID("${destination.server}.${destination.room}".toByteArray())
|
||||
|
Reference in New Issue
Block a user