The markup handling is kind of dirty, because some displaying logic is inside the XMPP module, and the APIs are also inconsistent..
This cleanup will alter the API to the point that:
xmpp.sendMessage() and visual.formatMessage() both accept a body argument that is {html, text}, where text is a string and html is an array of DOM nodes.
(xmpp.sendMessage also accepts a single DOM node for convenience)
The markup handling is kind of dirty, because some displaying logic is inside the XMPP module, and the APIs are also inconsistent..
This cleanup will alter the API to the point that:
body
argument that is{html, text}
, wheretext
is a string andhtml
is an array of DOM nodes.(xmpp.sendMessage also accepts a single DOM node for convenience)