mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07: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);
|
long threadId = getThreadIdForMessage(messageId);
|
||||||
db.delete(TABLE_NAME, ID_WHERE, new String[] {messageId+""});
|
db.delete(TABLE_NAME, ID_WHERE, new String[] {messageId+""});
|
||||||
boolean threadDeleted = DatabaseComponent.get(context).threadDatabase().update(threadId, false, true);
|
boolean threadDeleted = DatabaseComponent.get(context).threadDatabase().update(threadId, false, true);
|
||||||
notifyConversationListeners(threadId);
|
|
||||||
return threadDeleted;
|
return threadDeleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1512,18 +1512,12 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
|
|||||||
}
|
}
|
||||||
recipientDb.setApproved(sender, true)
|
recipientDb.setApproved(sender, true)
|
||||||
recipientDb.setApprovedMe(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(
|
val message = IncomingMediaMessage(
|
||||||
sender.address,
|
sender.address,
|
||||||
response.sentTimestamp!!,
|
response.sentTimestamp!!,
|
||||||
-1,
|
-1,
|
||||||
expiresInMillis,
|
0,
|
||||||
expireStartedAt,
|
0,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user