diff --git a/core/client_connections.js b/core/client_connections.js index 4c16d610..93bb9465 100644 --- a/core/client_connections.js +++ b/core/client_connections.js @@ -38,7 +38,7 @@ function getActiveNodeList(authUsersOnly) { node : ac.node, authenticated : ac.user.isAuthenticated(), userId : ac.user.userId, - action : _.has(ac, 'currentMenuModule.menuConfig.desc') ? ac.currentMenuModule.menuConfig.desc : 'Unknown', + action : _.get(ac, 'currentMenuModule.menuConfig.desc', 'Unknown'), }; // @@ -48,7 +48,7 @@ function getActiveNodeList(authUsersOnly) { entry.userName = ac.user.username; entry.realName = ac.user.properties.real_name; entry.location = ac.user.properties.location; - entry.affils = ac.user.properties.affiliation; + entry.affils = entry.affiliation = ac.user.properties.affiliation; const diff = now.diff(moment(ac.user.properties.last_login_timestamp), 'minutes'); entry.timeOn = moment.duration(diff, 'minutes'); diff --git a/docs/modding/last-callers.md b/docs/modding/last-callers.md index 1f7aee8e..6e18d346 100644 --- a/docs/modding/last-callers.md +++ b/docs/modding/last-callers.md @@ -23,7 +23,7 @@ Available `config` block entries: * `actionIndicatorDefault`: Default indicator when an action is not set. Defaults to "-". ### Theming -When in a list view, the following `itemFormat` object is provided: +The following `itemFormat` object is provided to MCI 1 (ie: `%VM1`): * `userId`: User ID. * `realName`: User's real name or "N/A". * `ts`: Timestamp in `dateTimeFormat` format. diff --git a/docs/modding/whos-online.md b/docs/modding/whos-online.md new file mode 100644 index 00000000..feec5f7e --- /dev/null +++ b/docs/modding/whos-online.md @@ -0,0 +1,17 @@ +--- +layout: page +title: Who's Online +--- +## The Who's OnlineModule +The built in `whos_online` module provides a basic who's online mod. + +### Theming +The following `itemFormat` object is provided to MCI 1 (ie: `%VM1`): +* `userId`: User ID. +* `node`: Node ID the user is connected to. +* `timeOn`: A human friendly amount of time the user has been online. +* `realName`: User's real name. +* `location`: User's location. +* `affiliation` or `affils`: Users affiliations. +* `action`: Current action/view in the system taken from the `desc` field of the current MenuModule they are interacting with. For example, "Playing L.O.R.D". +