More variable case

This commit is contained in:
David Baker 2016-07-14 18:18:44 +01:00
parent 2fd690ea2b
commit 9fd0ea1e32

View file

@ -30,17 +30,17 @@ var PRESENCE_CLASS = {
}; };
function presenceClassForMember(presence_state, last_active_ago) { function presenceClassForMember(presenceState, lastActiveAgo) {
// offline is split into two categories depending on whether we have // offline is split into two categories depending on whether we have
// a last_active_ago for them. // a last_active_ago for them.
if (presence_state == 'offline') { if (presenceState == 'offline') {
if (last_active_ago) { if (lastActiveAgo) {
return PRESENCE_CLASS['offline'] + '_beenactive'; return PRESENCE_CLASS['offline'] + '_beenactive';
} else { } else {
return PRESENCE_CLASS['offline'] + '_neveractive'; return PRESENCE_CLASS['offline'] + '_neveractive';
} }
} else if (presence_state) { } else if (presenceState) {
return PRESENCE_CLASS[presence_state]; return PRESENCE_CLASS[presenceState];
} else { } else {
return PRESENCE_CLASS['offline'] + '_neveractive'; return PRESENCE_CLASS['offline'] + '_neveractive';
} }