Tag MUC PMs

This gives the server the chance to react accordingly without applying
much logic.
Also it makes it easier for us to recognize MUC PMs in MAM querys
This commit is contained in:
Philipp Hörist 2018-02-21 23:09:30 +01:00
parent 70e0bcc5db
commit 1fbc6a2304
1 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,7 @@ from gajim.common import exceptions
from gajim.common import check_X509
from gajim.common.connection_handlers import *
from gajim.common.helpers import version_condition
from gajim.common.contacts import GC_Contact
from gajim.gtkgui_helpers import get_action
@ -373,6 +374,10 @@ class CommonConnection:
contact = app.contacts.get_contact_with_highest_priority(
self.name, obj.jid)
# Mark Message as MUC PM
if isinstance(contact, GC_Contact):
msg_iq.setTag('x', namespace=nbxmpp.NS_MUC_USER)
# chatstates - if peer supports xep85, send chatstates
# please note that the only valid tag inside a message containing a
# <body> tag is the active event