diff --git a/app/definitions/rest/v1/channels.ts b/app/definitions/rest/v1/channels.ts index d3b0a966e..8bca5f1d6 100644 --- a/app/definitions/rest/v1/channels.ts +++ b/app/definitions/rest/v1/channels.ts @@ -99,7 +99,7 @@ export type ChannelsEndpoints = { }; 'channels.roles': { GET: (params: { roomId: string }) => { roles: IGetRoomRoles[] }; - }; + }; 'channels.messages': { GET: (params: { roomId: IServerRoom['_id']; diff --git a/app/definitions/rest/v1/groups.ts b/app/definitions/rest/v1/groups.ts index ff329f2f0..d22dabfc5 100644 --- a/app/definitions/rest/v1/groups.ts +++ b/app/definitions/rest/v1/groups.ts @@ -75,7 +75,7 @@ export type GroupsEndpoints = { }; 'groups.roles': { GET: (params: { roomId: string }) => { roles: IGetRoomRoles[] }; - }; + }; 'groups.messages': { GET: (params: { roomId: IServerRoom['_id']; diff --git a/app/lib/rocketchat/rocketchat.js b/app/lib/rocketchat/rocketchat.js index 451d9ea6b..394bb4833 100644 --- a/app/lib/rocketchat/rocketchat.js +++ b/app/lib/rocketchat/rocketchat.js @@ -377,12 +377,6 @@ const RocketChat = { // RC 3.1.0 return this.post('users.2fa.sendEmailCode', { emailOrUsername: username }); }, - addUsersToRoom(rid) { - let { users } = reduxStore.getState().selectedUsers; - users = users.map(u => u.name); - // RC 0.51.0 - return this.methodCallWrapper('addUsersToRoom', { rid, users }); - }, hasRole(role) { const shareUser = reduxStore.getState().share.user; const loginUser = reduxStore.getState().login.user; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index e48415987..981f49615 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -753,6 +753,13 @@ export const useInviteToken = (token: string): any => // @ts-ignore sdk.post('useInviteToken', { token }); +export const addUsersToRoom = (rid: string): Promise => { + const { users: selectedUsers } = reduxStore.getState().selectedUsers; + const users = selectedUsers.map(u => u.name); + // RC 0.51.0 + return sdk.methodCallWrapper('addUsersToRoom', { rid, users }); +}; + export const emitTyping = (room: IRoom, typing = true) => { const { login, settings } = reduxStore.getState(); const { UI_Use_Real_Name } = settings;