diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 1604880af..cc176ea03 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -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({ diff --git a/app/sagas/createChannel.js b/app/sagas/createChannel.js index 86a5b613b..37d249a74 100644 --- a/app/sagas/createChannel.js +++ b/app/sagas/createChannel.js @@ -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); }