fix: do not traceback on encrypted payloads without a tab open

This commit is contained in:
mathieui 2021-12-14 00:01:28 +01:00 committed by Maxime “pep” Buquet
parent aaa6911a39
commit 8ca55b4442

View file

@ -352,7 +352,7 @@ class E2EEPlugin(BasePlugin):
exc,
)
# XXX: check before commit. Do we not nack in MUCs?
if not isinstance(tab, MucTab):
if tab and not isinstance(tab, MucTab):
tab.nack_message(msg, stanza['id'], stanza['from'])
# TODO: display exceptions to the user properly
log.error('Exception in encrypt:', exc_info=True)