chore!: Remove meteor unmuteUserInRoom method (#36822)

This commit is contained in:
Martin Schoeler 2025-08-28 15:47:21 -03:00 committed by Guilherme Gazzo
parent 33e7a69f1b
commit 18db8dd58c
2 changed files with 5 additions and 27 deletions

View File

@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---
Removes deprecated meteor method `unmuteUserInRoom`

View File

@ -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<ServerMethods>({
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);
},
});