Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 3 additions & 1 deletion app/definitions/rest/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { UserEndpoints } from './user';
import { UsersEndpoints } from './users';
import { TeamsEndpoints } from './teams';
import { E2eEndpoints } from './e2e';
import { SubscriptionsEndpoints } from './subscriptions';

export type Endpoints = ChannelsEndpoints &
ChatEndpoints &
Expand All @@ -32,4 +33,5 @@ export type Endpoints = ChannelsEndpoints &
UserEndpoints &
UsersEndpoints &
TeamsEndpoints &
E2eEndpoints;
E2eEndpoints &
SubscriptionsEndpoints;
5 changes: 5 additions & 0 deletions app/definitions/rest/v1/subscriptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export type SubscriptionsEndpoints = {
'subscriptions.unread': {
POST: (params: { firstUnreadMessage: { _id: string } }) => {};
};
};
4 changes: 1 addition & 3 deletions app/lib/rocketchat/services/restApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,8 @@ export const deleteMessage = (messageId: string, rid: string): any =>
// @ts-ignore
sdk.post('chat.delete', { msgId: messageId, roomId: rid });

export const markAsUnread = ({ messageId }: { messageId: string }): any =>
export const markAsUnread = ({ messageId }: { messageId: string }) =>
// RC 0.65.0
// TODO: missing definitions from server
// @ts-ignore
sdk.post('subscriptions.unread', { firstUnreadMessage: { _id: messageId } });

export const toggleStarMessage = (messageId: string, starred: boolean): any => {
Expand Down