apply status system changes

This commit is contained in:
pypy
2020-02-25 22:32:16 +09:00
parent 7dbd0d7006
commit 5a3068ccbc
4 changed files with 40 additions and 30 deletions

View File

@@ -1098,7 +1098,7 @@ CefSharp.BindObjectAsync(
/*
params: {
status: string ('active', 'join me', 'busy', 'offline'),
status: string ('active', 'offline', 'busy', 'ask me', 'join me'),
statusDescription: string
}
*/
@@ -3756,17 +3756,20 @@ CefSharp.BindObjectAsync(
$app.methods.userStatusClass = function (user) {
var style = {};
if (user !== undefined) {
// due to social status, check if the user isn't currentUser
if (user.state === 'active' &&
user.id !== API.currentUser.id) {
style.inactive = true;
} else if (user.location === 'offline') {
if (user.location === 'offline') {
// Offline
style.offline = true;
} else if (user.status === 'active') {
// Online
style.active = true;
} else if (user.status === 'join me') {
// Join Me
style.joinme = true;
} else if (user.status === 'ask me') {
// Ask Me
style.askme = true;
} else if (user.status === 'busy') {
// Do Not Disturb
style.busy = true;
}
}