From 773880c79911ab3aafdb11ee8d896e958a2281b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 8 May 2020 15:11:21 +0200 Subject: [PATCH] PrivateTab: extract NS contant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/tabs/privatetab.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py index 6033e774..7206240f 100644 --- a/poezio/tabs/privatetab.py +++ b/poezio/tabs/privatetab.py @@ -30,6 +30,8 @@ from poezio.decorators import command_args_parser log = logging.getLogger(__name__) +NS_MUC_USER = 'http://jabber.org/protocol/muc#user' + class PrivateTab(OneToOneTab): """ @@ -153,7 +155,7 @@ class PrivateTab(OneToOneTab): ) msg['type'] = 'chat' msg['body'] = line - x = ET.Element('{http://jabber.org/protocol/muc#user}x') + x = ET.Element('{%s}x' % NS_MUC_USER) msg.append(x) # trigger the event BEFORE looking for colors. # This lets a plugin insert \x19xxx} colors, that will