Properly handle child nodes for api.presence.send
This commit is contained in:
parent
2f244da8b1
commit
e6e416306e
@ -48,7 +48,7 @@ converse.plugins.add('converse-caps', {
|
||||
XMPPStatus: {
|
||||
constructPresence () {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ converse.plugins.add('converse-status', {
|
||||
if (!Array.isArray(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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user