Skip to content

Commit 49422b7

Browse files
chore: remove sendFileMessage meteor method (#40288)
1 parent d033ad5 commit 49422b7

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

apps/meteor/app/file-upload/server/methods/sendFileMessage.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import type {
88
IMessage,
99
FileProp,
1010
} from '@rocket.chat/core-typings';
11-
import type { ServerMethods } from '@rocket.chat/ddp-client';
1211
import { Rooms, Uploads, Users } from '@rocket.chat/models';
1312
import { Match, check } from 'meteor/check';
1413
import { Meteor } from 'meteor/meteor';
@@ -156,13 +155,6 @@ export const parseFileIntoMessageAttachments = async (
156155
return { files, attachments };
157156
};
158157

159-
declare module '@rocket.chat/ddp-client' {
160-
// eslint-disable-next-line @typescript-eslint/naming-convention
161-
interface ServerMethods {
162-
sendFileMessage: (roomId: string, _store: string, file: Partial<IUpload>, msgData?: Record<string, any>) => boolean;
163-
}
164-
}
165-
166158
export const sendFileMessage = async (
167159
userId: string,
168160
{
@@ -232,16 +224,3 @@ export const sendFileMessage = async (
232224

233225
return msg;
234226
};
235-
236-
Meteor.methods<ServerMethods>({
237-
async sendFileMessage(roomId, _store, file, msgData = {}) {
238-
const userId = Meteor.userId();
239-
if (!userId) {
240-
throw new Meteor.Error('error-invalid-user', 'Invalid user', {
241-
method: 'sendFileMessage',
242-
} as any);
243-
}
244-
245-
return sendFileMessage(userId, { roomId, file, msgData });
246-
},
247-
});

0 commit comments

Comments
 (0)