diff --git a/.changeset/fast-walls-eat.md b/.changeset/fast-walls-eat.md new file mode 100644 index 00000000000..1c82cd4c325 --- /dev/null +++ b/.changeset/fast-walls-eat.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Removes deprecated meteor method `unmuteUserInRoom` diff --git a/apps/meteor/server/methods/unmuteUserInRoom.ts b/apps/meteor/server/methods/unmuteUserInRoom.ts index 3d139e80e11..242174b3462 100644 --- a/apps/meteor/server/methods/unmuteUserInRoom.ts +++ b/apps/meteor/server/methods/unmuteUserInRoom.ts @@ -1,12 +1,9 @@ import { Message } from '@rocket.chat/core-services'; import type { IRoom } from '@rocket.chat/core-typings'; -import type { ServerMethods } from '@rocket.chat/ddp-client'; import { Rooms, Subscriptions, Users } from '@rocket.chat/models'; -import { Match, 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 { notifyOnRoomChangedById } from '../../app/lib/server/lib/notifyListener'; import { RoomMemberActions } from '../../definition/IRoomTypeConfig'; import { callbacks } from '../lib/callbacks'; @@ -82,27 +79,3 @@ export const unmuteUserInRoom = async (fromId: string, data: { rid: IRoom['_id'] return true; }; - -Meteor.methods({ - async unmuteUserInRoom(data) { - methodDeprecationLogger.method('unmuteUserInRoom', '8.0.0', '/v1/rooms.unmuteUser'); - - const fromId = Meteor.userId(); - - check( - data, - Match.ObjectIncluding({ - rid: String, - username: String, - }), - ); - - if (!fromId) { - throw new Meteor.Error('error-not-allowed', 'Not allowed', { - method: 'unmuteUserInRoom', - }); - } - - return unmuteUserInRoom(fromId, data); - }, -});