chore!: Remove unused `omnichannelExternalFrameGenerateKey` (#32921)

pull/33390/head
Douglas Fabris 2 years ago committed by Guilherme Gazzo
parent 10bb637bfe
commit 06326341e2
  1. 12
      apps/meteor/app/livechat/client/externalFrame/generateNewKey.ts
  2. 1
      apps/meteor/app/livechat/client/externalFrame/index.ts
  3. 1
      apps/meteor/app/livechat/client/index.ts
  4. 18
      apps/meteor/app/livechat/server/externalFrame/generateNewKey.ts
  5. 1
      apps/meteor/app/livechat/server/externalFrame/index.ts
  6. 1
      apps/meteor/app/livechat/server/index.ts
  7. 9
      apps/meteor/server/settings/omnichannel.ts

@ -1,12 +0,0 @@
import type { ServerMethods } from '@rocket.chat/ddp-client';
import { Meteor } from 'meteor/meteor';
import { sdk } from '../../../utils/client/lib/SDKClient';
import { generateKey } from './crypto';
Meteor.methods<ServerMethods>({
async omnichannelExternalFrameGenerateKey() {
const key = await generateKey();
await sdk.call('saveSetting', 'Omnichannel_External_Frame_Encryption_JWK', key);
},
});

@ -2,4 +2,3 @@ import '../lib/messageTypes';
import './voip';
import './ui';
import './stylesheets/livechat.css';
import './externalFrame';

@ -1,18 +0,0 @@
import type { ServerMethods } from '@rocket.chat/ddp-client';
import { Meteor } from 'meteor/meteor';
declare module '@rocket.chat/ddp-client' {
// eslint-disable-next-line @typescript-eslint/naming-convention
interface ServerMethods {
omnichannelExternalFrameGenerateKey(): unknown;
}
}
Meteor.methods<ServerMethods>({
// eslint-disable-next-line @typescript-eslint/no-empty-function
omnichannelExternalFrameGenerateKey() {
return {
message: 'Generating_key',
};
}, // only to prevent error when calling the client method
});

@ -74,5 +74,4 @@ import './lib/stream/agentStatus';
import './sendMessageBySMS';
import './api';
import './api/rest';
import './externalFrame';
import './methods/saveBusinessHour';

@ -852,14 +852,5 @@ await settingsRegistry.addGroup('SMS', async function () {
value: true,
},
});
await this.add('Omnichannel_External_Frame_GenerateKey', 'omnichannelExternalFrameGenerateKey', {
type: 'action',
actionText: 'Generate_new_key',
enableQuery: {
_id: 'Omnichannel_External_Frame_Enabled',
value: true,
},
});
});
});

Loading…
Cancel
Save