update for adding multiple members (#25128)
* update for adding multiple members
* fix unit test
* more test fixes
* add another unit test
* fix object passed by client4
* revert package-lock.json
* revert package-lock.json
* add length check
* limit size of lists in API requests
* revert package-lock
* add batching to front end
* add batching to front end
* fix bad merge
* update return type
* remove unnecessary permisssion check, add unit test
* fixes and add tests from review
* revert changes adding limits to other apis
* fixes
* clean-up from code review
* fix unit test call
* revert back to interface{}, fix unit test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4f68dbb96e
Коммит
6fd894953c
@@ -1811,6 +1811,16 @@ export default class Client4 {
|
||||
);
|
||||
};
|
||||
|
||||
addToChannels = (userIds: string[], channelId: string, postRootId = '') => {
|
||||
this.trackEvent('api', 'api_channels_add_members', {channel_id: channelId});
|
||||
|
||||
const members = {user_ids: userIds, channel_id: channelId, post_root_id: postRootId};
|
||||
return this.doFetch<ChannelMembership[]>(
|
||||
`${this.getChannelMembersRoute(channelId)}`,
|
||||
{method: 'post', body: JSON.stringify(members)},
|
||||
);
|
||||
};
|
||||
|
||||
addToChannel = (userId: string, channelId: string, postRootId = '') => {
|
||||
this.trackEvent('api', 'api_channels_add_member', {channel_id: channelId});
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user