mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-05 17:15:04 -05:00
Fix: Load MUCs
This commit is contained in:
parent
cd49158025
commit
424be688f9
@ -68,9 +68,10 @@ module.exports = BaseCollection.extend({
|
||||
if (err) return;
|
||||
|
||||
rooms = res.discoItems.items;
|
||||
if (rooms === undefined)
|
||||
rooms = [];
|
||||
var roomNum = 0;
|
||||
|
||||
if (rooms) {
|
||||
rooms.forEach (function (room) {
|
||||
client.getDiscoInfo(room.jid, '', function (err, res) {
|
||||
|
||||
@ -94,7 +95,6 @@ module.exports = BaseCollection.extend({
|
||||
if (cb && roomNum == rooms.length) cb();
|
||||
});
|
||||
});
|
||||
}
|
||||
}).then(function() {
|
||||
if (cb && !rooms.length) cb();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user