From afaee7e7ec180f5f0b4c151bf1f0a51fa16f84e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 17 Mar 2022 00:13:44 +0100 Subject: plugins/b64: specify supported_tab_types; Fix type in plugin_e2ee MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugins/b64.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/b64.py b/plugins/b64.py index 3557229c..9b4c4ab3 100644 --- a/plugins/b64.py +++ b/plugins/b64.py @@ -27,7 +27,13 @@ from typing import List, Optional from slixmpp import Message, JID from poezio.plugin_e2ee import E2EEPlugin -from poezio.tabs import ChatTab +from poezio.tabs import ( + ChatTab, + MucTab, + PrivateTab, + DynamicConversationTab, + StaticConversationTab, +) class Plugin(E2EEPlugin): @@ -40,6 +46,14 @@ class Plugin(E2EEPlugin): # This encryption mechanism is using as a container replace_body_with_eme = False + # In what tab is it ok to use this plugin. Here we want all of them + supported_tab_types = ( + MucTab, + PrivateTab, + DynamicConversationTab, + StaticConversationTab, + ) + async def decrypt(self, message: Message, jid: Optional[JID], _tab: Optional[ChatTab]) -> None: """ Decrypt base64 -- cgit v1.2.3