From 0bf8727a92b5e2891398d6f3ee7a3669213734ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 7 Sep 2019 21:07:02 +0200 Subject: tabs/privatetab: Fixes #3491: Add MUC marker in MUC-PMs. Thanks Ge0rG. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From [XEP-0045 §7.5](https://xmpp.org/extensions/xep-0045.html#privatemessage): > To allow for proper synchronization of these messages to the user's > other clients by Message Carbons (XEP-0280) [19], the sending client > SHOULD add an element qualified by the > 'http://jabber.org/protocol/muc#user' namespace to the message. Signed-off-by: Maxime “pep” Buquet --- poezio/tabs/privatetab.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'poezio/tabs') diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py index 8d2c1b11..e5ee770e 100644 --- a/poezio/tabs/privatetab.py +++ b/poezio/tabs/privatetab.py @@ -13,6 +13,7 @@ the ConversationTab (such as tab-completion on nicks from the room). import curses import logging from typing import Dict, Callable +from xml.etree import cElementTree as ET from slixmpp import JID @@ -152,6 +153,8 @@ class PrivateTab(OneToOneTab): ) msg['type'] = 'chat' msg['body'] = line + x = ET.Element('{http://jabber.org/protocol/muc#user}x') + msg.append(x) # trigger the event BEFORE looking for colors. # This lets a plugin insert \x19xxx} colors, that will # be converted in xhtml. -- cgit v1.2.3