Skip to content

Commit

Permalink
Include contact status in roster rendering
Browse files Browse the repository at this point in the history
Taken from the corresponding user in our main roster if he exists.

Fixes candy-chat#325
  • Loading branch information
benlangfeld committed Dec 19, 2014
1 parent 2d5a7e5 commit 85f6e2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/view/pane/roster.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ Candy.View.Pane = (function(self, $) {
// a user joined the room
if(action === 'join') {
usercountDiff = 1;
var contact = user.getContact();
var html = Mustache.to_html(Candy.View.Template.Roster.user, {
roomId: roomId,
userId : userId,
userJid: user.getJid(),
realJid: user.getRealJid(),
status: contact ? contact.getStatus() : 'unavailable',
nick: user.getNick(),
displayNick: Candy.Util.crop(user.getNick(), Candy.View.getOptions().crop.roster.nickname),
role: user.getRole(),
Expand Down

0 comments on commit 85f6e2c

Please sign in to comment.