[FIX] Direct Message between multiple users REST (#1974)
This commit is contained in:
parent
df0a38566b
commit
d810c28c30
|
@ -627,11 +627,11 @@ const RocketChat = {
|
|||
},
|
||||
|
||||
createGroupChat() {
|
||||
let { users } = reduxStore.getState().selectedUsers;
|
||||
users = users.map(u => u.name);
|
||||
const { users } = reduxStore.getState().selectedUsers;
|
||||
const usernames = users.map(u => u.name).join(',');
|
||||
|
||||
// RC 3.1.0
|
||||
return this.methodCall('createDirectMessage', ...users);
|
||||
return this.post('im.create', { usernames });
|
||||
},
|
||||
|
||||
createDiscussion({
|
||||
|
|
|
@ -28,7 +28,10 @@ const handleRequest = function* handleRequest({ data }) {
|
|||
|
||||
let sub;
|
||||
if (data.group) {
|
||||
sub = yield call(createGroupChat);
|
||||
const result = yield call(createGroupChat);
|
||||
if (result.success) {
|
||||
({ room: sub } = result);
|
||||
}
|
||||
} else {
|
||||
sub = yield call(createChannel, data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue