summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2021-07-18 23:30:46 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2022-03-16 08:09:11 +0100
commitb9abd60673cca31fd853eaea78a08323a5c4a47f (patch)
treea99139859be13578709b5141954b9419480694b7
parentcfa1bfc5b297a2fd01ff794a6976534fe101a40e (diff)
downloadpoezio-b9abd60673cca31fd853eaea78a08323a5c4a47f.tar.gz
poezio-b9abd60673cca31fd853eaea78a08323a5c4a47f.tar.bz2
poezio-b9abd60673cca31fd853eaea78a08323a5c4a47f.tar.xz
poezio-b9abd60673cca31fd853eaea78a08323a5c4a47f.zip
plugin_e2ee: Add TODO in _encrypt filter
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--poezio/plugin_e2ee.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py
index ba0e6cd7..1f674d99 100644
--- a/poezio/plugin_e2ee.py
+++ b/poezio/plugin_e2ee.py
@@ -431,6 +431,16 @@ class E2EEPlugin(BasePlugin):
return None
async def _encrypt(self, stanza: StanzaBase, passthrough: bool = True) -> Optional[StanzaBase]:
+ # TODO: Let through messages that contain elements that don't need to
+ # be encrypted even in an encrypted context, such as MUC mediated
+ # invites, etc.
+ # What to do when they're mixed with other elements? It probably
+ # depends on the element. Maybe they can be mixed with
+ # `self.tag_whitelist` that are already assumed to be sent as plain by
+ # the E2EE plugin.
+ # They might not be accompanied by a <body/> most of the time, nor by
+ # an encrypted tag.
+
if not isinstance(stanza, Message) or stanza['type'] not in ('normal', 'chat', 'groupchat'):
raise NothingToEncrypt()
message = stanza