Bugfix. Wrong number of online contacts shown. Fixes #97

This commit is contained in:
JC Brand 2013-12-18 16:48:02 +02:00
parent 4186bf3ca3
commit 478653aebd
2 changed files with 8 additions and 1 deletions

View File

@ -2707,11 +2707,15 @@
getNumOnlineContacts: function () {
var count = 0,
ignored = ['offline', 'unavailable'],
models = this.models,
models_length = models.length,
i;
if (converse.show_only_online_users) {
ignored = _.union(ignored, ['dnd', 'xa', 'away']);
}
for (i=0; i<models_length; i++) {
if (_.indexOf(['offline', 'unavailable'], models[i].get('chat_status')) === -1) {
if (_.indexOf(ignored, models[i].get('chat_status')) === -1) {
count++;
}
}

View File

@ -4,7 +4,10 @@ Changelog
0.7.2 (Unreleased)
------------------
.. note:: This release contains an important security fix.
* #48 Add event emitter support and emit events. [jcbrand]
* #97 Wrong number of online contacts shown with config option ``show_only_online_users``. [jcbrand]
* #100 Make the fetching of vCards optional (enabled by default). [jcbrand]
* Sanitize message text to avoid Javascript injection attacks. Thanks to hejsan for reporting. [jcbrand]