Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
cdc6df5b by Philipp Hörist at 2026-06-30T22:43:25+02:00
imprv: OpenPGP: Don't add fallback body text
EME is long enough in existence that we can assume all clients support it
- - - - -
1 changed file:
- nbxmpp/modules/openpgp.py
Changes:
=====================================
nbxmpp/modules/openpgp.py
=====================================
@@ -349,7 +349,7 @@ def get_rpad() -> str:
def create_message_stanza(
- stanza: Message, encrypted_payload: str | bytes, with_fallback_text: bool
+ stanza: Message, encrypted_payload: str | bytes, with_eme: bool
) -> None:
b64encoded_payload = b64encode(encrypted_payload)
@@ -357,13 +357,11 @@ def create_message_stanza(
openpgp_node.addData(b64encoded_payload)
stanza.addChild(node=openpgp_node)
- eme_node = Node(
- "encryption", attrs={"xmlns": Namespace.EME, "namespace":
Namespace.OPENPGP}
- )
- stanza.addChild(node=eme_node)
-
- if with_fallback_text:
- stanza.setBody("This message is *encrypted* with OpenPGP")
+ if with_eme:
+ eme_node = Node(
+ "encryption", attrs={"xmlns": Namespace.EME, "namespace":
Namespace.OPENPGP}
+ )
+ stanza.addChild(node=eme_node)
def _make_keylist(keylist: list[PGPKeyMetadata] | None) -> Node:
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/cdc6df5beba1b5d32e9e0057da99a61095afa27f
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/cdc6df5beba1b5d32e9e0057da99a61095afa27f
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]