1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-27 22:42:06 +01:00

Check if message has EME before adding it

This commit is contained in:
Paul Schaub 2018-07-03 11:40:02 +02:00
parent 6c9e41c1b2
commit 813690c10a
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -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.");