Add fallback text when a known to be OMEMO-encrypted message failed to decrypt

This commit is contained in:
Thibaut Girka 2019-02-09 14:18:44 +01:00 committed by fiaxh
parent 6ffa82d622
commit b97aa9b44b

View file

@ -247,6 +247,7 @@ public class TrustManager {
StanzaNode? _encrypted = stanza.stanza.get_subnode("encrypted", NS_URI);
if (_encrypted == null || MessageFlag.get_flag(stanza) != null || stanza.from == null) return false;
StanzaNode encrypted = (!)_encrypted;
if (message.body == null) message.body = "[This message is OMEMO encrypted]";
if (!Plugin.ensure_context()) return false;
MessageFlag flag = new MessageFlag();
stanza.add_flag(flag);