fix: auto save

This commit is contained in:
rhunk 2024-03-18 19:13:16 +01:00
parent 006bf6dbf0
commit 51a2fe88cd
2 changed files with 2 additions and 3 deletions

View File

@ -64,9 +64,8 @@ class AutoSave : MessagingRuleFeature("Auto Save", MessagingRuleType.AUTO_SAVE,
}
if (context.feature(StealthMode::class).canUseRule(targetConversationId)) return false
if (!canUseRule(targetConversationId)) return false
return true
return canUseRule(targetConversationId)
}
override fun asyncOnActivityCreate() {

View File

@ -36,7 +36,7 @@ class UnsaveableMessages : MessagingRuleFeature(
val contentType = firstOrNull(2)?.value
if (contentType != ContentType.STATUS.id.toLong()) {
remove(7)
addVarInt(7, 1) // set savePolicy to PROHIBITED
addVarInt(7, if (contentType != ContentType.SNAP.id) 3 else 1) // set savePolicy to PROHIBITED only for snaps
}
}
}.toByteArray()