mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-24 04:52:05 +01:00
Check if message has EME before adding it
This commit is contained in:
parent
6c9e41c1b2
commit
813690c10a
1 changed files with 5 additions and 4 deletions
|
@ -102,10 +102,11 @@ public class OpenPgpContact implements FingerprintsChangedListener {
|
||||||
message.addExtension(encryptedPayload);
|
message.addExtension(encryptedPayload);
|
||||||
|
|
||||||
// Add additional information to the message
|
// Add additional information to the message
|
||||||
// STOPSHIP: 20.06.18 BELOW
|
if (!ExplicitMessageEncryptionElement.hasProtocol(message,
|
||||||
// TODO: Check if message already contains EME element.
|
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol.openpgpV0)) {
|
||||||
message.addExtension(new ExplicitMessageEncryptionElement(
|
message.addExtension(new ExplicitMessageEncryptionElement(
|
||||||
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol.openpgpV0));
|
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol.openpgpV0));
|
||||||
|
}
|
||||||
StoreHint.set(message);
|
StoreHint.set(message);
|
||||||
message.setBody("This message is encrypted using XEP-0374: OpenPGP for XMPP: Instant Messaging.");
|
message.setBody("This message is encrypted using XEP-0374: OpenPGP for XMPP: Instant Messaging.");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue