From de629d9416a89681000788cfd10b0651b5b84533 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sat, 20 Mar 2021 03:17:49 +0100 Subject: [PATCH] Pass link to plugin message handlers For master plugins a message can be received from any of the clients corrently connected to the master. In order for plugins to be able to handle link specific requests they need a reference to the link messages was received from. Add link as the third argument to plugin message handlers. --- packages/lib/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lib/plugin.js b/packages/lib/plugin.js index 046190fd..74a27960 100644 --- a/packages/lib/plugin.js +++ b/packages/lib/plugin.js @@ -530,7 +530,7 @@ function attachPluginMessages(link, plugin) { messageFormat.attach(link); } else { - messageFormat.attach(link, async (message, format) => await plugin[handler](message, format)); + messageFormat.attach(link, async (message, format) => await plugin[handler](message, format, link)); } } catch (err) {