get custom profile fields after login (#30665)
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3eb007fc82
Коммит
b19ce98a74
@@ -11,7 +11,7 @@ import type {UserProfile, UserStatus, GetFilteredUsersStatsOpts, UsersStats, Use
|
|||||||
|
|
||||||
import {UserTypes, AdminTypes} from 'mattermost-redux/action_types';
|
import {UserTypes, AdminTypes} from 'mattermost-redux/action_types';
|
||||||
import {logError} from 'mattermost-redux/actions/errors';
|
import {logError} from 'mattermost-redux/actions/errors';
|
||||||
import {setServerVersion, getClientConfig, getLicenseConfig} from 'mattermost-redux/actions/general';
|
import {setServerVersion, getClientConfig, getLicenseConfig, getCustomProfileAttributeFields} from 'mattermost-redux/actions/general';
|
||||||
import {bindClientFunc, forceLogoutIfNecessary} from 'mattermost-redux/actions/helpers';
|
import {bindClientFunc, forceLogoutIfNecessary} from 'mattermost-redux/actions/helpers';
|
||||||
import {getServerLimits} from 'mattermost-redux/actions/limits';
|
import {getServerLimits} from 'mattermost-redux/actions/limits';
|
||||||
import {getMyPreferences} from 'mattermost-redux/actions/preferences';
|
import {getMyPreferences} from 'mattermost-redux/actions/preferences';
|
||||||
@@ -20,7 +20,7 @@ import {getMyTeams, getMyTeamMembers, getMyTeamUnreads} from 'mattermost-redux/a
|
|||||||
import {Client4} from 'mattermost-redux/client';
|
import {Client4} from 'mattermost-redux/client';
|
||||||
import {General} from 'mattermost-redux/constants';
|
import {General} from 'mattermost-redux/constants';
|
||||||
import {getIsUserStatusesConfigEnabled} from 'mattermost-redux/selectors/entities/common';
|
import {getIsUserStatusesConfigEnabled} from 'mattermost-redux/selectors/entities/common';
|
||||||
import {getServerVersion} from 'mattermost-redux/selectors/entities/general';
|
import {getServerVersion, getFeatureFlagValue} from 'mattermost-redux/selectors/entities/general';
|
||||||
import {isCollapsedThreadsEnabled} from 'mattermost-redux/selectors/entities/preferences';
|
import {isCollapsedThreadsEnabled} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
import {getCurrentUserId, getUser as selectUser, getUsers, getUsersByUsername} from 'mattermost-redux/selectors/entities/users';
|
import {getCurrentUserId, getUser as selectUser, getUsers, getUsersByUsername} from 'mattermost-redux/selectors/entities/users';
|
||||||
import type {ActionFuncAsync} from 'mattermost-redux/types/actions';
|
import type {ActionFuncAsync} from 'mattermost-redux/types/actions';
|
||||||
@@ -81,6 +81,10 @@ export function loadMe(): ActionFuncAsync<boolean> {
|
|||||||
dispatch(getMyTeamMembers()),
|
dispatch(getMyTeamMembers()),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if (getFeatureFlagValue(getState(), 'CustomProfileAttributes') === 'true') {
|
||||||
|
dispatch(getCustomProfileAttributeFields());
|
||||||
|
}
|
||||||
|
|
||||||
const isCollapsedThreads = isCollapsedThreadsEnabled(getState());
|
const isCollapsedThreads = isCollapsedThreadsEnabled(getState());
|
||||||
await dispatch(getMyTeamUnreads(isCollapsedThreads));
|
await dispatch(getMyTeamUnreads(isCollapsedThreads));
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user