poezio/plugin_e2ee: Add TODO in decryption method to match more than EME messages

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2019-07-02 00:55:41 +02:00
parent 0c54e834ff
commit 12e1c0374c
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -179,6 +179,11 @@ class E2EEPlugin(BasePlugin):
return jid in self._enabled_tabs and self._enabled_tabs[jid] == self.encrypt
def _decrypt(self, message: Message, tab: ChatTabs) -> None:
# TODO: Not all encrypted messages will contain EME. EME is typically
# used only when a message contains `<body/>`. Find a way to have the
# plugin register an element/ns to check for etc.
if message.xml.find('{%s}%s' % (EME_NS, EME_TAG)) is None:
return None