parent
35947e3d62
commit
ed63902ac1
|
@ -12,6 +12,7 @@
|
|||
- #1419: Clicking on avatar should show bigger version
|
||||
- #2647: Singleton mode doesn't work
|
||||
- #2704: Send button doesn't work in a multi-user chat
|
||||
- #2725: Send new presence status to all connected MUCs
|
||||
|
||||
- Emit a `change` event when a configuration setting changes
|
||||
- 3 New configuration settings:
|
||||
|
|
|
@ -18,7 +18,9 @@ export default {
|
|||
*/
|
||||
async send (type, to, status, child_nodes) {
|
||||
await api.waitUntil('statusInitialized');
|
||||
const presence = await _converse.xmppstatus.constructPresence(type, to, status);
|
||||
|
||||
const model= _converse.xmppstatus
|
||||
const presence = await model.constructPresence(type, to, status);
|
||||
if (child_nodes) {
|
||||
if (!Array.isArray(child_nodes)) {
|
||||
child_nodes = [child_nodes];
|
||||
|
@ -26,6 +28,20 @@ export default {
|
|||
child_nodes.map(c => c?.tree() ?? c).forEach(c => presence.cnode(c).up());
|
||||
}
|
||||
api.send(presence);
|
||||
|
||||
if (['away', 'chat', 'dnd', 'online', 'xa', undefined].includes(type)) {
|
||||
const mucs = await api.rooms.get();
|
||||
mucs.forEach(async muc => {
|
||||
const presence = await model.constructPresence(type, muc.getRoomJIDAndNick(), status);
|
||||
if (child_nodes) {
|
||||
if (!Array.isArray(child_nodes)) {
|
||||
child_nodes = [child_nodes];
|
||||
}
|
||||
child_nodes.map(c => c?.tree() ?? c).forEach(c => presence.cnode(c).up());
|
||||
}
|
||||
api.send(presence);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user