From b97aa9b44b8ffc6d89824c91b0b85ffa7135fc32 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sat, 9 Feb 2019 14:18:44 +0100 Subject: Add fallback text when a known to be OMEMO-encrypted message failed to decrypt --- plugins/omemo/src/trust_manager.vala | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/omemo/src') diff --git a/plugins/omemo/src/trust_manager.vala b/plugins/omemo/src/trust_manager.vala index ef984ef6..75c0d809 100644 --- a/plugins/omemo/src/trust_manager.vala +++ b/plugins/omemo/src/trust_manager.vala @@ -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); -- cgit v1.2.3-70-g09d2