[FIX] Add method and id to method calls (#4444)
* add method and id to method calls
* 🧹
This commit is contained in:
parent
28043a2eb5
commit
31a8c3e4fb
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue