summaryrefslogtreecommitdiff
path: root/poezio/core
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2020-01-12 13:21:44 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2020-01-12 13:21:44 +0100
commit9007b0fc8b89c4b0e66f80ec7f50abd36ae36196 (patch)
treef641a6edd3f8555ad10a68e13605d41ca9bdc9a2 /poezio/core
parent6b2110329b712af1f15c2c521b21ed650e8e8537 (diff)
downloadpoezio-9007b0fc8b89c4b0e66f80ec7f50abd36ae36196.tar.gz
poezio-9007b0fc8b89c4b0e66f80ec7f50abd36ae36196.tar.bz2
poezio-9007b0fc8b89c4b0e66f80ec7f50abd36ae36196.tar.xz
poezio-9007b0fc8b89c4b0e66f80ec7f50abd36ae36196.zip
Prevent Traceback when receiving MUC-PM carbons under some conditions
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'poezio/core')
-rw-r--r--poezio/core/handlers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 8f2f2584..cfa5a147 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -797,7 +797,9 @@ class HandlerCore:
if body and not ignore:
tab = self.core.open_private_window(room_from, with_nick,
False)
- sender_nick = (tab.own_nick
+ # Tab can still be None here, when receiving carbons of a MUC-PM for
+ # example
+ sender_nick = (tab and tab.own_nick
or self.core.own_nick) if sent else with_nick
if ignore and not sent:
self.core.events.trigger('ignored_private', message, tab)