Commit 76b2a5a8 authored by Stelios Milidonis's avatar Stelios Milidonis

release 5.22

parent 594a313f
......@@ -57,6 +57,7 @@ export default {
TEAMMATE_NAME_DISPLAY: {
SHOW_USERNAME: 'username',
SHOW_NICKNAME_FULLNAME: 'nickname_full_name',
SHOW_NICKNAME_USERNAME: 'nickname_username',
SHOW_FULLNAME: 'full_name',
},
SPECIAL_MENTIONS: ['all', 'channel', 'here'],
......
......@@ -29,6 +29,7 @@ const Preferences: Dictionary<any> = {
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',
DISPLAY_PREFER_USERNAME: 'username',
MENTION_KEYS: 'mention_keys',
......
......@@ -25,6 +25,8 @@ export function displayUsername(
if (user) {
if (teammateNameDisplay === Preferences.DISPLAY_PREFER_NICKNAME) {
name = user.nickname || getFullName(user);
} else if (nameDisplay === Preferences.DISPLAY_PREFER_NICKNAME_USERNAME) {
name = user.nickname;
} else if (teammateNameDisplay === Preferences.DISPLAY_PREFER_FULL_NAME) {
name = getFullName(user);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment