Merge pull request #1691 from oxen-io/fix/ses-2804-message-reappearing-account-restored

Making sure restored accounts do not display deleted messages
This commit is contained in:
ThomasSession
2024-10-14 10:59:48 +11:00
committed by GitHub
4 changed files with 46 additions and 6 deletions

View File

@@ -196,6 +196,18 @@ class ConfigFactory(
}
}
override fun getConfigTimestamp(forConfigObject: ConfigBase, publicKey: String): Long {
val variant = when (forConfigObject) {
is UserProfile -> SharedConfigMessage.Kind.USER_PROFILE.name
is Contacts -> SharedConfigMessage.Kind.CONTACTS.name
is ConversationVolatileConfig -> SharedConfigMessage.Kind.CONVO_INFO_VOLATILE.name
is UserGroupsConfig -> SharedConfigMessage.Kind.GROUPS.name
else -> throw UnsupportedOperationException("Can't support type of ${forConfigObject::class.simpleName} yet")
}
return configDatabase.retrieveConfigLastUpdateTimestamp(variant, publicKey)
}
override fun conversationInConfig(
publicKey: String?,
groupPublicKey: String?,