Merge pull request #13013 from jamauro/current-method-invocation

Add method name to `MethodInvocation`
This commit is contained in:
Jan Dvorak
2024-03-25 16:37:28 +01:00
committed by GitHub
3 changed files with 12 additions and 0 deletions

View File

@@ -911,6 +911,7 @@ export class Connection {
};
const invocation = new DDPCommon.MethodInvocation({
name,
isSimulation: true,
userId: self.userId(),
isFromCallAsync: options?.isFromCallAsync,

View File

@@ -17,6 +17,16 @@ DDPCommon.MethodInvocation = class MethodInvocation {
// since there's usually no point in running stubs unless you have a
// zero-latency connection to the user.
/**
* @summary The name given to the method.
* @locus Anywhere
* @name name
* @memberOf DDPCommon.MethodInvocation
* @instance
* @type {String}
*/
this.name = options.name;
/**
* @summary Access inside a method invocation. Boolean value, true if this invocation is a stub.
* @locus Anywhere

View File

@@ -764,6 +764,7 @@ Object.assign(Session.prototype, {
};
var invocation = new DDPCommon.MethodInvocation({
name: msg.method,
isSimulation: false,
userId: self.userId,
setUserId: setUserId,