mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-05 08:54:29 +02:00
fix: auto save
This commit is contained in:
parent
006bf6dbf0
commit
51a2fe88cd
@ -64,9 +64,8 @@ class AutoSave : MessagingRuleFeature("Auto Save", MessagingRuleType.AUTO_SAVE,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (context.feature(StealthMode::class).canUseRule(targetConversationId)) return false
|
if (context.feature(StealthMode::class).canUseRule(targetConversationId)) return false
|
||||||
if (!canUseRule(targetConversationId)) return false
|
|
||||||
|
|
||||||
return true
|
return canUseRule(targetConversationId)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun asyncOnActivityCreate() {
|
override fun asyncOnActivityCreate() {
|
||||||
|
@ -36,7 +36,7 @@ class UnsaveableMessages : MessagingRuleFeature(
|
|||||||
val contentType = firstOrNull(2)?.value
|
val contentType = firstOrNull(2)?.value
|
||||||
if (contentType != ContentType.STATUS.id.toLong()) {
|
if (contentType != ContentType.STATUS.id.toLong()) {
|
||||||
remove(7)
|
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()
|
}.toByteArray()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user