From 9007b0fc8b89c4b0e66f80ec7f50abd36ae36196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 12 Jan 2020 13:21:44 +0100 Subject: Prevent Traceback when receiving MUC-PM carbons under some conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/core/handlers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3