Files
Jesse Hallam e76203baa0 add eslint-plugin-header, and --fix all (#1140)
* add eslint-plugin-header, and --fix all

While the checking feature of this plugin seems to work great, its --fix
will sometimes removing leading comments when the license header doesn't
match. I've hand-edited the over-zealous removals, so this won't be an
issue going forward except for new files with missing headers but
leading comments.

* fixes from latest master changes

* latest changes from master
2018-04-30 13:31:29 -04:00

15 lines
425 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
export function getPrefix(state) {
if (state && state.entities && state.entities.users && state.entities.users.profiles) {
const user = state.entities.users.profiles[state.entities.users.currentUserId];
if (user) {
return user.id + '_';
}
}
return 'unknown_';
}