MM-34069 include current user in return values from getProfile* actions (#5308)
This commit is contained in:
parent
f3b7c3a978
commit
f14d4ee70f
1 changed files with 3 additions and 6 deletions
|
|
@ -242,7 +242,6 @@ export function getProfiles(page = 0, perPage: number = General.PROFILE_CHUNK_SI
|
|||
|
||||
try {
|
||||
profiles = await Client4.getProfiles(page, perPage, options);
|
||||
removeUserFromList(currentUserId, profiles);
|
||||
} catch (error) {
|
||||
forceLogoutIfNecessary(error, dispatch, getState);
|
||||
dispatch(logError(error));
|
||||
|
|
@ -251,7 +250,7 @@ export function getProfiles(page = 0, perPage: number = General.PROFILE_CHUNK_SI
|
|||
|
||||
dispatch({
|
||||
type: UserTypes.RECEIVED_PROFILES_LIST,
|
||||
data: profiles,
|
||||
data: removeUserFromList(currentUserId, [...profiles]),
|
||||
});
|
||||
|
||||
return {data: profiles};
|
||||
|
|
@ -307,7 +306,6 @@ export function getProfilesByIds(userIds: Array<string>, options?: any): ActionF
|
|||
|
||||
try {
|
||||
profiles = await Client4.getProfilesByIds(userIds, options);
|
||||
removeUserFromList(currentUserId, profiles);
|
||||
} catch (error) {
|
||||
forceLogoutIfNecessary(error, dispatch, getState);
|
||||
dispatch(logError(error));
|
||||
|
|
@ -316,7 +314,7 @@ export function getProfilesByIds(userIds: Array<string>, options?: any): ActionF
|
|||
|
||||
dispatch({
|
||||
type: UserTypes.RECEIVED_PROFILES_LIST,
|
||||
data: profiles,
|
||||
data: removeUserFromList(currentUserId, [...profiles]),
|
||||
});
|
||||
|
||||
return {data: profiles};
|
||||
|
|
@ -330,7 +328,6 @@ export function getProfilesByUsernames(usernames: Array<string>): ActionFunc {
|
|||
|
||||
try {
|
||||
profiles = await Client4.getProfilesByUsernames(usernames);
|
||||
removeUserFromList(currentUserId, profiles);
|
||||
} catch (error) {
|
||||
forceLogoutIfNecessary(error, dispatch, getState);
|
||||
dispatch(logError(error));
|
||||
|
|
@ -339,7 +336,7 @@ export function getProfilesByUsernames(usernames: Array<string>): ActionFunc {
|
|||
|
||||
dispatch({
|
||||
type: UserTypes.RECEIVED_PROFILES_LIST,
|
||||
data: profiles,
|
||||
data: removeUserFromList(currentUserId, [...profiles]),
|
||||
});
|
||||
|
||||
return {data: profiles};
|
||||
|
|
|
|||
Loading…
Reference in a new issue