[GH-30077] New actions for websocket group member update (#30086)
* Added: Update on `groups` & `profiles` on websocket.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
12cbe5e839
Коммит
7770c03919
@@ -77,6 +77,7 @@ import type {
|
||||
GetGroupsParams,
|
||||
GetGroupsForUserParams,
|
||||
GroupStats,
|
||||
GroupMember,
|
||||
} from '@mattermost/types/groups';
|
||||
import type {PostActionResponse} from '@mattermost/types/integration_actions';
|
||||
import type {
|
||||
@@ -3745,14 +3746,14 @@ export default class Client4 {
|
||||
};
|
||||
|
||||
addUsersToGroup = (groupId: string, userIds: string[]) => {
|
||||
return this.doFetch<UserProfile[]>(
|
||||
return this.doFetch<GroupMember[]>(
|
||||
`${this.getGroupRoute(groupId)}/members`,
|
||||
{method: 'post', body: JSON.stringify({user_ids: userIds})},
|
||||
);
|
||||
};
|
||||
|
||||
removeUsersFromGroup = (groupId: string, userIds: string[]) => {
|
||||
return this.doFetch<UserProfile[]>(
|
||||
return this.doFetch<GroupMember[]>(
|
||||
`${this.getGroupRoute(groupId)}/members`,
|
||||
{method: 'delete', body: JSON.stringify({user_ids: userIds})},
|
||||
);
|
||||
|
||||
Ссылка в новой задаче
Block a user