mattermost-mobile/app/actions/views/channel_add_members.js
enahum dda0480fec Various Bug Fixes (#502)
* Fix edit post with APIv4

* Fix filterProfiles

* Fix intro message error for threads

* Fix members to load in channel action

* Fix channel members lists
2017-04-26 12:55:09 -03:00

16 lines
547 B
JavaScript

// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {addChannelMember} from 'mattermost-redux/actions/channels';
export function handleAddChannelMembers(channelId, members) {
return async (dispatch, getState) => {
try {
const requests = members.map((m) => dispatch(addChannelMember(channelId, m, getState)));
await Promise.all(requests);
} catch (error) {
// should be handled by global error handling
}
};
}