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
2 changes: 1 addition & 1 deletion app/definitions/IRocketChat.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import rocketchat from '../lib/rocketchat';

type TRocketChat = typeof rocketchat;
export type TRocketChat = typeof rocketchat;

export interface IRocketChat extends TRocketChat {
closeListener: any;
Expand Down
7 changes: 0 additions & 7 deletions app/lib/rocketchat/rocketchat.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ const RocketChat = {
}
return result;
},
e2eResetOwnKey() {
this.unsubscribeRooms();

// RC 0.72.0
return this.methodCallWrapper('e2e.resetOwnE2EKey');
},

loginTOTP,
loginWithPassword,
loginOAuthOrSso,
Expand Down
10 changes: 9 additions & 1 deletion app/lib/rocketchat/services/restApi.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sdk from './sdk';
import { TEAM_TYPE } from '../../../definitions/ITeam';
import roomTypeToApiType, { RoomTypes } from '../methods/roomTypeToApiType';
import { SubscriptionType, INotificationPreferences, IRoomNotifications } from '../../../definitions';
import { SubscriptionType, INotificationPreferences, IRoomNotifications, TRocketChat } from '../../../definitions';
import { ISpotlight } from '../../../definitions/ISpotlight';
import { IAvatarSuggestion, IParams } from '../../../definitions/IProfileViewInterfaces';

Expand Down Expand Up @@ -743,3 +743,11 @@ export const useInviteToken = (token: string): any =>
// TODO: missing definitions from server
// @ts-ignore
sdk.post('useInviteToken', { token });

export function e2eResetOwnKey(this: TRocketChat): Promise<boolean | {}> {
// {} when TOTP is enabled
this.unsubscribeRooms();
Comment thread
dnlsilva marked this conversation as resolved.

// RC 0.72.0
return sdk.methodCallWrapper('e2e.resetOwnE2EKey');
}