...
 
Commits (5)
{
"name": "mattermost-redux",
"version": "5.3.1",
"version": "5.6.2",
"description": "Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client",
"homepage": "https://github.com/mattermost/mattermost-redux",
"license": "Apache-2.0",
......
......@@ -68,6 +68,7 @@ export default {
TEAMMATE_NAME_DISPLAY: {
SHOW_USERNAME: 'username',
SHOW_NICKNAME_FULLNAME: 'nickname_full_name',
SHOW_NICKNAME_USERNAME: 'nickname_username',
SHOW_FULLNAME: 'full_name',
},
......
......@@ -29,6 +29,7 @@ export default {
CATEGORY_DISPLAY_SETTINGS: 'display_settings',
NAME_NAME_FORMAT: 'name_format',
DISPLAY_PREFER_NICKNAME: 'nickname_full_name',
DISPLAY_PREFER_NICKNAME_USERNAME: 'nickname_username',
DISPLAY_PREFER_FULL_NAME: 'full_name',
MENTION_KEYS: 'mention_keys',
......
......@@ -28,6 +28,8 @@ export function displayUsername(
if (user) {
if (teammateNameDisplay === Preferences.DISPLAY_PREFER_NICKNAME) {
name = user.nickname || getFullName(user);
} else if (teammateNameDisplay === Preferences.DISPLAY_PREFER_NICKNAME_USERNAME) {
name = user.nickname;
} else if (teammateNameDisplay === Preferences.DISPLAY_PREFER_FULL_NAME) {
name = getFullName(user);
} else {
......