diff options
author | Wim <wim@42.be> | 2019-04-06 22:18:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-06 22:18:25 +0200 |
commit | 115d20373c21b107a428a55247c64f900e116038 (patch) | |
tree | c7299b3d3be2a48c0f2d5bfbd856cbd1b27d2e55 /gateway | |
parent | cdf33e5748c110e12097130bdb44637e3d14b229 (diff) | |
download | matterbridge-msglm-115d20373c21b107a428a55247c64f900e116038.tar.gz matterbridge-msglm-115d20373c21b107a428a55247c64f900e116038.tar.bz2 matterbridge-msglm-115d20373c21b107a428a55247c64f900e116038.zip |
Update tengo vendor and load the stdlib. Fixes #789 (#792)
Diffstat (limited to 'gateway')
-rw-r--r-- | gateway/gateway.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index 82be2a98..9957a21d 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -10,6 +10,7 @@ import ( "github.com/42wim/matterbridge/bridge" "github.com/42wim/matterbridge/bridge/config" "github.com/d5/tengo/script" + "github.com/d5/tengo/stdlib" lru "github.com/hashicorp/golang-lru" "github.com/peterhellberg/emojilib" "github.com/sirupsen/logrus" @@ -503,6 +504,7 @@ func modifyMessageTengo(filename string, msg *config.Message) error { return err } s := script.New(res) + s.SetImports(stdlib.GetModuleMap(stdlib.AllModuleNames()...)) _ = s.Add("msgText", msg.Text) _ = s.Add("msgUsername", msg.Username) _ = s.Add("msgAccount", msg.Account) |