Unverified Commit feadd71e authored by Saturnino Abril's avatar Saturnino Abril Committed by GitHub
Browse files

[MM-10455] Include "id" to data for UserTypes actions -...

[MM-10455] Include "id" to data for UserTypes actions - RECEIVED_PROFILE_(NOT)_IN_TEAM / RECEIVED_PROFILE_(NOT)_IN_CHANNEL (#1214)

* include "id" to data for UserTypes actions - RECEIVED_PROFILE_(NOT)_IN_TEAM / RECEIVED_PROFILE_(NOT)_IN_CHANNEL

* update commit of mattermost-redux
parent 33979b98
......@@ -376,8 +376,7 @@ function handleLeaveTeamEvent(msg) {
dispatch(batchActions([
{
type: UserTypes.RECEIVED_PROFILE_NOT_IN_TEAM,
data: {user_id: msg.data.user_id},
id: msg.data.team_id,
data: {id: msg.data.team_id, user_id: msg.data.user_id},
},
{
type: TeamTypes.REMOVE_MEMBER_FROM_TEAM,
......@@ -464,8 +463,7 @@ function handleUserAddedEvent(msg) {
getChannelStats(ChannelStore.getCurrentId())(dispatch, getState);
dispatch({
type: UserTypes.RECEIVED_PROFILE_IN_CHANNEL,
data: {user_id: msg.data.user_id},
id: msg.broadcast.channel_id,
data: {id: msg.broadcast.channel_id, user_id: msg.data.user_id},
});
}
......@@ -503,8 +501,7 @@ function handleUserRemovedEvent(msg) {
getChannelStats(ChannelStore.getCurrentId())(dispatch, getState);
dispatch({
type: UserTypes.RECEIVED_PROFILE_NOT_IN_CHANNEL,
data: {user_id: msg.data.user_id},
id: msg.broadcast.channel_id,
data: {id: msg.broadcast.channel_id, user_id: msg.data.user_id},
});
}
}
......
......@@ -4244,8 +4244,7 @@
"eslint-plugin-header": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-header/-/eslint-plugin-header-1.2.0.tgz",
"integrity": "sha1-9wR3nG+8fGaPGA2DXeH0YrBGfDc=",
"dev": true
"integrity": "sha1-9wR3nG+8fGaPGA2DXeH0YrBGfDc="
},
"eslint-plugin-import": {
"version": "2.7.0",
......@@ -9503,9 +9502,10 @@
"dev": true
},
"mattermost-redux": {
"version": "github:mattermost/mattermost-redux#b1bb31daf58d5ec88f4f14627d6fe655d1570c03",
"version": "github:mattermost/mattermost-redux#50222617bbbe6381b4777c091720c6f6d833adbe",
"requires": {
"deep-equal": "1.0.1",
"eslint-plugin-header": "1.2.0",
"form-data": "2.3.1",
"harmony-reflect": "1.5.1",
"isomorphic-fetch": "2.2.1",
......
......@@ -328,8 +328,7 @@ class UserStoreClass extends EventEmitter {
removeProfileFromTeam(teamId, userId) {
store.dispatch({
type: UserTypes.RECEIVED_PROFILE_NOT_IN_TEAM,
data: {user_id: userId},
id: teamId,
data: {id: teamId, user_id: userId},
});
}
......@@ -364,8 +363,7 @@ class UserStoreClass extends EventEmitter {
removeProfileNotInTeam(teamId, userId) {
store.dispatch({
type: UserTypes.RECEIVED_PROFILE_IN_TEAM,
data: {user_id: userId},
id: teamId,
data: {id: teamId, user_id: userId},
});
}
......@@ -374,24 +372,21 @@ class UserStoreClass extends EventEmitter {
saveProfileInChannel(channelId = ChannelStore.getCurrentId(), profile) {
store.dispatch({
type: UserTypes.RECEIVED_PROFILE_IN_CHANNEL,
data: {user_id: profile.id},
id: channelId,
data: {id: channelId, user_id: profile.id},
});
}
saveUserIdInChannel(channelId = ChannelStore.getCurrentId(), userId) {
store.dispatch({
type: UserTypes.RECEIVED_PROFILE_IN_CHANNEL,
data: {user_id: userId},
id: channelId,
data: {id: channelId, user_id: userId},
});
}
removeProfileInChannel(channelId, userId) {
store.dispatch({
type: UserTypes.RECEIVED_PROFILE_NOT_IN_CHANNEL,
data: {user_id: userId},
id: channelId,
data: {id: channelId, user_id: userId},
});
}
......@@ -404,16 +399,14 @@ class UserStoreClass extends EventEmitter {
saveProfileNotInChannel(channelId = ChannelStore.getCurrentId(), profile) {
store.dispatch({
type: UserTypes.RECEIVED_PROFILE_NOT_IN_CHANNEL,
data: {user_id: profile.id},
id: channelId,
data: {id: channelId, user_id: profile.id},
});
}
removeProfileNotInChannel(channelId, userId) {
store.dispatch({
type: UserTypes.RECEIVED_PROFILE_IN_CHANNEL,
data: {user_id: userId},
id: channelId,
data: {id: channelId, user_id: userId},
});
}
......
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