Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/definitions/rest/v1/channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,7 @@ export type ChannelsEndpoints = {
'channels.convertToTeam': {
POST: (params: { channelId: string; channelName: string }) => { team: ITeam };
};
'channels.info': {
GET: (params: { roomId: string }) => { channel: IServerRoomItem };
};
};
4 changes: 1 addition & 3 deletions app/lib/rocketchat/services/restApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,8 @@ export const getRoomCounters = (roomId: string, t: RoomTypes): any =>
// @ts-ignore
sdk.get(`${roomTypeToApiType(t)}.counters`, { roomId });

export const getChannelInfo = (roomId: string): any =>
export const getChannelInfo = (roomId: string) =>
// RC 0.48.0
// TODO: missing definitions from server
// @ts-ignore
sdk.get('channels.info', { roomId });

export const getUserPreferences = (userId: string): any =>
Expand Down
2 changes: 1 addition & 1 deletion app/views/RoomActionsView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
try {
const result = await RocketChat.getChannelInfo(room.rid);
if (result.success) {
this.setState({ room: { ...result.channel, rid: result.channel._id } });
this.setState({ room: { ...result.channel, rid: result.channel._id } as any });
Comment thread
gerzonc marked this conversation as resolved.
Outdated
}
} catch (e) {
log(e);
Expand Down