diff --git a/gajim/common/modules/message.py b/gajim/common/modules/message.py index 96ef78d5ef2c91aeb1f521d440be2119fac4db43..681f1c26e80edc8a14d0815da94fa8949cc25672 100644 --- a/gajim/common/modules/message.py +++ b/gajim/common/modules/message.py @@ -343,6 +343,11 @@ def build_message_stanza(self, message): stanza.setTag('no-store', namespace=Namespace.MSG_HINTS) + # Add other nodes + if message.nodes is not None: + for node in message.nodes: + stanza.addChild(node=node) + return stanza def log_message(self, message): diff --git a/gajim/common/structs.py b/gajim/common/structs.py index 651969701a85dba2d3656060ec50af0eb721bd38..11bea3925f8d211e4f033477aa749ec79da83488 100644 --- a/gajim/common/structs.py +++ b/gajim/common/structs.py @@ -65,7 +65,8 @@ def __init__(self, correct_id=None, automatic_message=False, oob_url=None, - xhtml=None): + xhtml=None, + nodes=None): if type_ not in ('chat', 'groupchat', 'normal', 'headline'): raise ValueError('Unknown message type: %s' % type_) @@ -110,6 +111,8 @@ def __init__(self, if xhtml is not None: self.additional_data.set_value('gajim', 'xhtml', xhtml) + self.nodes = nodes + self.timestamp = None self.message_id = None self.stanza = None