summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-09-07 21:07:02 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2019-09-07 21:07:02 +0200
commit0bf8727a92b5e2891398d6f3ee7a3669213734ea (patch)
tree17a31cadd2529d5f4896d3de1adf96998e4f19f7
parent237301527331cf820cdff28ea5d529525627fccc (diff)
downloadpoezio-0bf8727a92b5e2891398d6f3ee7a3669213734ea.tar.gz
poezio-0bf8727a92b5e2891398d6f3ee7a3669213734ea.tar.bz2
poezio-0bf8727a92b5e2891398d6f3ee7a3669213734ea.tar.xz
poezio-0bf8727a92b5e2891398d6f3ee7a3669213734ea.zip
tabs/privatetab: Fixes #3491: Add MUC <x/> marker in MUC-PMs. Thanks Ge0rG.
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 <pep@bouah.net>
-rw-r--r--poezio/tabs/privatetab.py3
1 files changed, 3 insertions, 0 deletions
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.