mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
fix: prevent message request response from being deleted by any config
This commit is contained in:
parent
2e3d50364c
commit
9dc8f18b86
@ -629,7 +629,6 @@ public class SmsDatabase extends MessagingDatabase {
|
||||
long threadId = getThreadIdForMessage(messageId);
|
||||
db.delete(TABLE_NAME, ID_WHERE, new String[] {messageId+""});
|
||||
boolean threadDeleted = DatabaseComponent.get(context).threadDatabase().update(threadId, false, true);
|
||||
notifyConversationListeners(threadId);
|
||||
return threadDeleted;
|
||||
}
|
||||
|
||||
|
@ -1512,18 +1512,12 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
|
||||
}
|
||||
recipientDb.setApproved(sender, true)
|
||||
recipientDb.setApprovedMe(sender, true)
|
||||
val expirationConfig = getExpirationConfiguration(threadId)
|
||||
val expiryMode = expirationConfig?.expiryMode
|
||||
val expiresInMillis = (expiryMode?.expirySeconds ?: 0) * 1000L
|
||||
val expireStartedAt = if (expiryMode is ExpiryMode.AfterSend) {
|
||||
response.sentTimestamp!!
|
||||
} else 0
|
||||
val message = IncomingMediaMessage(
|
||||
sender.address,
|
||||
response.sentTimestamp!!,
|
||||
-1,
|
||||
expiresInMillis,
|
||||
expireStartedAt,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user