mattermost-mobile/app/actions/views/channel_add_members.js
CJ 55f048ad76
MM-18173 Removed getState from Add Channel Member method (#3371)
Removed getState from Add Channel Member method since the Redux store is not looking for it. 3rd param for this method is a postRootID, which is not sent from this request.
2019-10-12 01:30:03 -04:00

16 lines
502 B
JavaScript

// Copyright (c) 2015-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) => {
try {
const requests = members.map((m) => dispatch(addChannelMember(channelId, m)));
return await Promise.all(requests);
} catch (error) {
return error;
}
};
}