Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion app/definitions/rest/v1/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export type ChatEndpoints = {
'chat.getThreadsList': {
GET: (params: {
rid: IServerRoom['_id'];
type: 'unread' | 'following' | 'all';
type?: 'unread' | 'following' | 'all';
text?: string;
offset: number;
count: number;
Expand Down
7 changes: 3 additions & 4 deletions app/lib/rocketchat/services/restApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,12 +656,11 @@ export const toggleFollowMessage = (mid: string, follow: boolean) => {
};

export const getThreadsList = ({ rid, count, offset, text }: { rid: string; count: number; offset: number; text?: string }) => {
const params: any = {
const params = {
rid,
count,
offset,
sort: { ts: -1 }
};
offset
} as { rid: string; count: number; offset: number; text?: string };
if (text) {
params.text = text;
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/ThreadMessagesView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class ThreadMessagesView extends React.Component<IThreadMessagesViewProps, IThre
this.setState({ loading: true });

try {
const result: any = await RocketChat.getThreadsList({
const result = await RocketChat.getThreadsList({
rid: this.rid,
count: API_FETCH_COUNT,
offset: messages.length,
Expand Down