From e24e61d1389a917fc35c6463ff8e924f35936eee Mon Sep 17 00:00:00 2001 From: jamauro Date: Tue, 20 Feb 2024 10:58:12 -0600 Subject: [PATCH] add method name to MethodInvocation --- packages/ddp-client/common/livedata_connection.js | 1 + packages/ddp-common/method_invocation.js | 10 ++++++++++ packages/ddp-server/livedata_server.js | 1 + 3 files changed, 12 insertions(+) diff --git a/packages/ddp-client/common/livedata_connection.js b/packages/ddp-client/common/livedata_connection.js index 868201c43d..949dc5b092 100644 --- a/packages/ddp-client/common/livedata_connection.js +++ b/packages/ddp-client/common/livedata_connection.js @@ -911,6 +911,7 @@ export class Connection { }; const invocation = new DDPCommon.MethodInvocation({ + name, isSimulation: true, userId: self.userId(), isFromCallAsync: options?.isFromCallAsync, diff --git a/packages/ddp-common/method_invocation.js b/packages/ddp-common/method_invocation.js index acf66120d5..18a7b2ac0a 100644 --- a/packages/ddp-common/method_invocation.js +++ b/packages/ddp-common/method_invocation.js @@ -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 diff --git a/packages/ddp-server/livedata_server.js b/packages/ddp-server/livedata_server.js index 334e957cad..7faec01103 100644 --- a/packages/ddp-server/livedata_server.js +++ b/packages/ddp-server/livedata_server.js @@ -764,6 +764,7 @@ Object.assign(Session.prototype, { }; var invocation = new DDPCommon.MethodInvocation({ + name: msg.method, isSimulation: false, userId: self.userId, setUserId: setUserId,