diff --git a/app/lib/services/sdk.ts b/app/lib/services/sdk.ts index 05099c52a..3f1e47968 100644 --- a/app/lib/services/sdk.ts +++ b/app/lib/services/sdk.ts @@ -6,6 +6,7 @@ import { twoFactor } from './twoFactor'; import { isSsl } from '../methods/helpers/url'; import { store as reduxStore } from '../store/auxStore'; import { Serialized, MatchPathPattern, OperationParams, PathFor, ResultFor } from '../../definitions/rest/helpers'; +import { random } from '../methods/helpers'; class Sdk { private sdk: typeof Rocketchat; @@ -140,7 +141,7 @@ class Sdk { const url = isEmpty(user) ? 'method.callAnon' : 'method.call'; // @ts-ignore return this.post(`${url}/${method}`, { - message: EJSON.stringify({ method, params }) + message: EJSON.stringify({ msg: 'method', id: random(10), method, params }) }); } const parsedParams = params.map(param => {