Commit dcc808b7 authored by Maxime Buquet's avatar Maxime Buquet Committed by Jordi Mallach
Browse files

Add an option to show nicknames if set, or usernames.

Mattermost doesn't provide a way to user the nickname if set, and if not
fallback on the username, instead of the full name. This adds an option
for it.
Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <>
parent b4e4da97
......@@ -30,6 +30,7 @@ export default {
CATEGORY_DISPLAY_SETTINGS: 'display_settings',
NAME_NAME_FORMAT: 'name_format',
DISPLAY_PREFER_NICKNAME: 'nickname_full_name',
MENTION_KEYS: 'mention_keys',
......@@ -30,6 +30,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 {
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