fix self-chat
This commit is contained in:
1 parent
f00c31f794
commit
a717157734
2 files changed
+17
-6
No files matched your search
@@ -1460,6 +1460,14 @@ final class AppModel: ObservableObject {
|
||||
}
|
||||
|
||||
func encryptionEnabled(for jid: String) -> Bool {
|
||||
// A conversation with the account's own bare JID is a self-chat.
|
||||
// OMEMO to oneself is meaningless and would force MartinOMEMO to build
|
||||
// a cryptographically invalid self-session (see
|
||||
// `LumaOMEMOStore.removeSessionWithOwnDevice`), producing messages
|
||||
// that later fail to decrypt. Always send self-chat plaintext.
|
||||
if let account, jid.lowercased() == account.normalizedJID {
|
||||
return false
|
||||
}
|
||||
return encryptionPreference(for: jid).resolved(globalEnabled: globalEncryptionEnabled)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user