|
|
|
@ -27,26 +27,30 @@ Template.chatRoomItem.helpers({ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let statusClass = false; |
|
|
|
|
|
|
|
|
|
let status = 'offline'; |
|
|
|
|
if (this.t === 'd') { |
|
|
|
|
switch (RocketChat.roomTypes.getUserStatus(this.t, this.rid)) { |
|
|
|
|
case 'online': |
|
|
|
|
statusClass = 'general-success-background'; |
|
|
|
|
break; |
|
|
|
|
case 'away': |
|
|
|
|
statusClass = 'general-pending-background'; |
|
|
|
|
break; |
|
|
|
|
case 'busy': |
|
|
|
|
statusClass = 'general-error-background'; |
|
|
|
|
break; |
|
|
|
|
case 'offline': |
|
|
|
|
statusClass = 'general-inactive-background'; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
statusClass = 'general-inactive-background'; |
|
|
|
|
} |
|
|
|
|
status = Session.get(`user_${ this.name }_status`); |
|
|
|
|
} else { |
|
|
|
|
status = RocketChat.roomTypes.getUserStatus(this.t, this.rid); |
|
|
|
|
} |
|
|
|
|
switch (status) { |
|
|
|
|
case 'online': |
|
|
|
|
statusClass = 'general-success-background'; |
|
|
|
|
break; |
|
|
|
|
case 'away': |
|
|
|
|
statusClass = 'general-pending-background'; |
|
|
|
|
break; |
|
|
|
|
case 'busy': |
|
|
|
|
statusClass = 'general-error-background'; |
|
|
|
|
break; |
|
|
|
|
case 'offline': |
|
|
|
|
statusClass = 'general-inactive-background'; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
statusClass = 'general-inactive-background'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Sound notification
|
|
|
|
|
if (!(FlowRouter.getParam('name') === this.name) && !this.ls && this.alert === true) { |
|
|
|
|
KonchatNotification.newRoom(this.rid); |
|
|
|
|