[FIX] teams.removeMembers mobile usage (#3557)
This commit is contained in:
parent
b3028b7c29
commit
905e12380a
|
@ -835,17 +835,21 @@ const RocketChat = {
|
||||||
// RC 3.13.0
|
// RC 3.13.0
|
||||||
return this.post('teams.removeRoom', { roomId, teamId });
|
return this.post('teams.removeRoom', { roomId, teamId });
|
||||||
},
|
},
|
||||||
leaveTeam({ teamName, rooms }) {
|
leaveTeam({ teamId, rooms }) {
|
||||||
// RC 3.13.0
|
// RC 3.13.0
|
||||||
return this.post('teams.leave', { teamName, rooms });
|
return this.post('teams.leave', {
|
||||||
|
teamId,
|
||||||
|
// RC 4.2.0
|
||||||
|
...(rooms?.length && { rooms })
|
||||||
|
});
|
||||||
},
|
},
|
||||||
removeTeamMember({ teamId, teamName, userId, rooms }) {
|
removeTeamMember({ teamId, userId, rooms }) {
|
||||||
// RC 3.13.0
|
// RC 3.13.0
|
||||||
return this.post('teams.removeMember', {
|
return this.post('teams.removeMember', {
|
||||||
teamId,
|
teamId,
|
||||||
teamName,
|
|
||||||
userId,
|
userId,
|
||||||
rooms
|
// RC 4.2.0
|
||||||
|
...(rooms?.length && { rooms })
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateTeamRoom({ roomId, isDefault }) {
|
updateTeamRoom({ roomId, isDefault }) {
|
||||||
|
|
|
@ -67,7 +67,7 @@ const handleLeaveRoom = function* handleLeaveRoom({ room, roomType, selected })
|
||||||
if (roomType === 'channel') {
|
if (roomType === 'channel') {
|
||||||
result = yield RocketChat.leaveRoom(room.rid, room.t);
|
result = yield RocketChat.leaveRoom(room.rid, room.t);
|
||||||
} else if (roomType === 'team') {
|
} else if (roomType === 'team') {
|
||||||
result = yield RocketChat.leaveTeam({ teamName: room.name, ...(selected && { rooms: selected }) });
|
result = yield RocketChat.leaveTeam({ teamId: room.teamId, ...(selected && { rooms: selected }) });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result?.success) {
|
if (result?.success) {
|
||||||
|
|
|
@ -246,7 +246,6 @@ class RoomMembersView extends React.Component {
|
||||||
const userId = selectedUser._id;
|
const userId = selectedUser._id;
|
||||||
const result = await RocketChat.removeTeamMember({
|
const result = await RocketChat.removeTeamMember({
|
||||||
teamId: room.teamId,
|
teamId: room.teamId,
|
||||||
teamName: room.name,
|
|
||||||
userId,
|
userId,
|
||||||
...(selected && { rooms: selected })
|
...(selected && { rooms: selected })
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue