Add fallback text when a known to be OMEMO-encrypted message failed to decrypt
This commit is contained in:
parent
6ffa82d622
commit
b97aa9b44b
|
@ -247,6 +247,7 @@ public class TrustManager {
|
||||||
StanzaNode? _encrypted = stanza.stanza.get_subnode("encrypted", NS_URI);
|
StanzaNode? _encrypted = stanza.stanza.get_subnode("encrypted", NS_URI);
|
||||||
if (_encrypted == null || MessageFlag.get_flag(stanza) != null || stanza.from == null) return false;
|
if (_encrypted == null || MessageFlag.get_flag(stanza) != null || stanza.from == null) return false;
|
||||||
StanzaNode encrypted = (!)_encrypted;
|
StanzaNode encrypted = (!)_encrypted;
|
||||||
|
if (message.body == null) message.body = "[This message is OMEMO encrypted]";
|
||||||
if (!Plugin.ensure_context()) return false;
|
if (!Plugin.ensure_context()) return false;
|
||||||
MessageFlag flag = new MessageFlag();
|
MessageFlag flag = new MessageFlag();
|
||||||
stanza.add_flag(flag);
|
stanza.add_flag(flag);
|
||||||
|
|
Loading…
Reference in a new issue