Commit e6e41630 authored by JC Brand's avatar JC Brand

Properly handle child nodes for api.presence.send

parent 2f244da8
...@@ -48,7 +48,7 @@ converse.plugins.add('converse-caps', { ...@@ -48,7 +48,7 @@ converse.plugins.add('converse-caps', {
XMPPStatus: { XMPPStatus: {
constructPresence () { constructPresence () {
const presence = this.__super__.constructPresence.apply(this, arguments); const presence = this.__super__.constructPresence.apply(this, arguments);
presence.root().cnode(createCapsNode(this.__super__._converse)); presence.root().cnode(createCapsNode(this.__super__._converse)).up();
return presence; return presence;
} }
} }
......
...@@ -261,7 +261,7 @@ converse.plugins.add('converse-status', { ...@@ -261,7 +261,7 @@ converse.plugins.add('converse-status', {
if (!Array.isArray(child_nodes)) { if (!Array.isArray(child_nodes)) {
child_nodes = [child_nodes]; child_nodes = [child_nodes];
} }
child_nodes.forEach(c => presence.c(c).up()); child_nodes.map(c => c?.tree() ?? c).forEach(c => presence.cnode(c).up());
} }
api.send(presence); api.send(presence);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment