PrivateTab: extract NS contant

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2020-05-08 15:11:21 +02:00
parent e2dc69f9e1
commit 773880c799
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -30,6 +30,8 @@ from poezio.decorators import command_args_parser
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
NS_MUC_USER = 'http://jabber.org/protocol/muc#user'
class PrivateTab(OneToOneTab): class PrivateTab(OneToOneTab):
""" """
@ -153,7 +155,7 @@ class PrivateTab(OneToOneTab):
) )
msg['type'] = 'chat' msg['type'] = 'chat'
msg['body'] = line msg['body'] = line
x = ET.Element('{http://jabber.org/protocol/muc#user}x') x = ET.Element('{%s}x' % NS_MUC_USER)
msg.append(x) msg.append(x)
# trigger the event BEFORE looking for colors. # trigger the event BEFORE looking for colors.
# This lets a plugin insert \x19xxx} colors, that will # This lets a plugin insert \x19xxx} colors, that will