diff --git a/.changeset/smooth-birds-crash.md b/.changeset/smooth-birds-crash.md new file mode 100644 index 00000000000..6dfe28b72b1 --- /dev/null +++ b/.changeset/smooth-birds-crash.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': major +--- + +Removes deprecated `removeCannedResponse` method diff --git a/apps/meteor/ee/app/canned-responses/server/methods/removeCannedResponse.ts b/apps/meteor/ee/app/canned-responses/server/methods/removeCannedResponse.ts index d1ab09e578f..a4464aa8bb3 100644 --- a/apps/meteor/ee/app/canned-responses/server/methods/removeCannedResponse.ts +++ b/apps/meteor/ee/app/canned-responses/server/methods/removeCannedResponse.ts @@ -1,19 +1,10 @@ -import type { ServerMethods } from '@rocket.chat/ddp-client'; import { CannedResponse } from '@rocket.chat/models'; import { check } from 'meteor/check'; import { Meteor } from 'meteor/meteor'; import { hasPermissionAsync } from '../../../../../app/authorization/server/functions/hasPermission'; -import { methodDeprecationLogger } from '../../../../../app/lib/server/lib/deprecationWarningLogger'; import notifications from '../../../../../app/notifications/server/lib/Notifications'; -declare module '@rocket.chat/ddp-client' { - // eslint-disable-next-line @typescript-eslint/naming-convention - interface ServerMethods { - removeCannedResponse(_id: string): Promise; - } -} - export const removeCannedResponse = async (uid: string, _id: string): Promise => { if (!(await hasPermissionAsync(uid, 'remove-canned-responses'))) { throw new Meteor.Error('error-not-allowed', 'Not allowed', { @@ -34,18 +25,3 @@ export const removeCannedResponse = async (uid: string, _id: string): Promise({ - async removeCannedResponse(_id) { - methodDeprecationLogger.method('removeCannedResponse', '8.0.0', 'DELETE /v1/canned-responses/:_id'); - const uid = Meteor.userId(); - - if (!uid) { - throw new Meteor.Error('error-not-allowed', 'Not allowed', { - method: 'removeCannedResponse', - }); - } - - return removeCannedResponse(uid, _id); - }, -});