plugins/b64: specify supported_tab_types; Fix type in plugin_e2ee
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
dc894b9849
commit
afaee7e7ec
2 changed files with 16 additions and 2 deletions
|
@ -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 <body/> 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
|
||||
|
|
|
@ -131,7 +131,7 @@ class E2EEPlugin(BasePlugin):
|
|||
_enabled_tabs: Dict[JID, Callable] = {}
|
||||
|
||||
# Tabs that support this encryption mechanism
|
||||
supported_tab_types: Tuple[Type[ChatTabs], ...] = tuple()
|
||||
supported_tab_types: Tuple[Type[ChatTab], ...] = tuple()
|
||||
|
||||
# States for each remote entity
|
||||
trust_states: Dict[str, Set[str]] = {'accepted': set(), 'rejected': set()}
|
||||
|
|
Loading…
Reference in a new issue