From 0e656d2add40b429be6132a510a21a406ac71759 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sun, 4 Jan 2015 11:51:17 +0100 Subject: [PATCH] Make sure to show buddies which never set a status. --- static/js/services/buddylist.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/services/buddylist.js b/static/js/services/buddylist.js index a19ca9fb..07e46768 100644 --- a/static/js/services/buddylist.js +++ b/static/js/services/buddylist.js @@ -383,6 +383,10 @@ define(['jquery', 'angular', 'underscore', 'modernizr', 'avltree', 'text!partial Buddylist.prototype.setDisplay = function(id, scope, data, queueName) { var status = data.Status; + if (!status) { + status = {}; // Make sure to show buddies which never set a status. + } + var display = scope.display; // Set display.name. display.displayName = status.displayName; @@ -501,7 +505,7 @@ define(['jquery', 'angular', 'underscore', 'modernizr', 'avltree', 'text!partial scope = newscope; } }, this)); - if (sessionData && sessionData.Status) { + if (sessionData) { this.setDisplay(id, scope, sessionData, "joined"); } else if (!noApply) { scope.$apply();