Skip to content
Snippets Groups Projects
Commit ae397ca8 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Message: Allow plugins to add arbitrary xml elements

parent 147ed3c5
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment