Bugfix. Wrong number of online contacts shown. Fixes #97
This commit is contained in:
parent
4186bf3ca3
commit
478653aebd
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user