Skip to content

Commit f993e29

Browse files
committed
chore: move 3 more with-REST methods to #40654; drop USED block/unblock
Moved to #40654 (orphan + REST replacement) after route cross-check: - license:getTags → /v1/licenses.info - UserPresence:setDefaultStatus → /v1/users.setStatus - getRoomJoinCode → /v1/channels.info, /v1/groups.info Dropped entirely (not orphan — used dynamically by client): - blockUser - unblockUser useMethod(isUserBlocked ? 'unblockUser' : 'blockUser') in useBlockUserAction.ts wouldn't be caught by static audit, so deprecating them would throw in TEST_MODE-equipped UI test runs.
1 parent 3b66812 commit f993e29

5 files changed

Lines changed: 3 additions & 10 deletions

File tree

apps/meteor/app/lib/server/methods/blockUser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Meteor } from 'meteor/meteor';
55

66
import { RoomMemberActions } from '../../../../definition/IRoomTypeConfig';
77
import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator';
8-
import { methodDeprecationLogger } from '../lib/deprecationWarningLogger';
98
import { notifyOnSubscriptionChangedByRoomIdAndUserIds } from '../lib/notifyListener';
109

1110
declare module '@rocket.chat/ddp-client' {
@@ -20,7 +19,6 @@ Meteor.methods<ServerMethods>({
2019
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
2120
*/
2221
async blockUser({ rid, blocked }) {
23-
methodDeprecationLogger.method('blockUser', '9.0.0', []);
2422
check(rid, String);
2523
check(blocked, String);
2624
const userId = Meteor.userId();

apps/meteor/app/lib/server/methods/getRoomJoinCode.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { check } from 'meteor/check';
55
import { Meteor } from 'meteor/meteor';
66

77
import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission';
8-
import { methodDeprecationLogger } from '../lib/deprecationWarningLogger';
98

109
declare module '@rocket.chat/ddp-client' {
1110
// eslint-disable-next-line @typescript-eslint/naming-convention
@@ -16,7 +15,7 @@ declare module '@rocket.chat/ddp-client' {
1615
/* @deprecated */
1716
Meteor.methods<ServerMethods>({
1817
async getRoomJoinCode(rid) {
19-
methodDeprecationLogger.method('getRoomJoinCode', '9.0.0', []);
18+
2019
check(rid, String);
2120

2221
const userId = Meteor.userId();

apps/meteor/app/lib/server/methods/unblockUser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Subscriptions } from '@rocket.chat/models';
33
import { check } from 'meteor/check';
44
import { Meteor } from 'meteor/meteor';
55

6-
import { methodDeprecationLogger } from '../lib/deprecationWarningLogger';
76
import { notifyOnSubscriptionChangedByRoomIdAndUserIds } from '../lib/notifyListener';
87

98
declare module '@rocket.chat/ddp-client' {
@@ -18,7 +17,6 @@ Meteor.methods<ServerMethods>({
1817
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
1918
*/
2019
async unblockUser({ rid, blocked }) {
21-
methodDeprecationLogger.method('unblockUser', '9.0.0', []);
2220
check(rid, String);
2321
check(blocked, String);
2422
const userId = Meteor.userId();

apps/meteor/ee/app/license/server/methods.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { License } from '@rocket.chat/license';
44
import { check } from 'meteor/check';
55
import { Meteor } from 'meteor/meteor';
66

7-
import { methodDeprecationLogger } from '../../../../app/lib/server/lib/deprecationWarningLogger';
87

98
declare module '@rocket.chat/ddp-client' {
109
// eslint-disable-next-line @typescript-eslint/naming-convention
@@ -32,7 +31,7 @@ Meteor.methods<ServerMethods>({
3231
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
3332
*/
3433
'license:getTags'() {
35-
methodDeprecationLogger.method('license:getTags', '9.0.0', []);
34+
3635
return License.getTags();
3736
},
3837
'license:isEnterprise'() {

apps/meteor/server/methods/userPresence.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { UserStatus } from '@rocket.chat/core-typings';
33
import type { ServerMethods } from '@rocket.chat/ddp-client';
44
import { Meteor } from 'meteor/meteor';
55

6-
import { methodDeprecationLogger } from '../../app/lib/server/lib/deprecationWarningLogger';
76

87
declare module '@rocket.chat/ddp-client' {
98
// eslint-disable-next-line @typescript-eslint/naming-convention
@@ -19,7 +18,7 @@ Meteor.methods<ServerMethods>({
1918
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
2019
*/
2120
'UserPresence:setDefaultStatus'(status) {
22-
methodDeprecationLogger.method('UserPresence:setDefaultStatus', '9.0.0', []);
21+
2322
const { userId } = this;
2423
if (!userId) {
2524
return;

0 commit comments

Comments
 (0)