@@ -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' ;
1211import { Rooms , Uploads , Users } from '@rocket.chat/models' ;
1312import { Match , check } from 'meteor/check' ;
1413import { 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-
166158export 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