diff options
author | Wim <wim@42.be> | 2019-04-24 22:47:37 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2019-04-24 22:47:37 +0200 |
commit | bd0e81f5a0290fbc07a26664d327c09c306b9597 (patch) | |
tree | cd675c2e6ad1d75c97a55bd062c2d5d65535b43e | |
parent | f04d360ee2664595c391358506eba060b4df2199 (diff) | |
download | matterbridge-msglm-bd0e81f5a0290fbc07a26664d327c09c306b9597.tar.gz matterbridge-msglm-bd0e81f5a0290fbc07a26664d327c09c306b9597.tar.bz2 matterbridge-msglm-bd0e81f5a0290fbc07a26664d327c09c306b9597.zip |
Add msg event to tengo
-rw-r--r-- | gateway/gateway.go | 2 | ||||
-rw-r--r-- | matterbridge.toml.sample | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index a9c331bc..b875ccae 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -572,10 +572,12 @@ func (gw *Gateway) modifySendMessageTengo(origmsg *config.Message, msg *config.M _ = s.Add("inProtocol", origmsg.Protocol) _ = s.Add("inChannel", origmsg.Channel) _ = s.Add("inGateway", origmsg.Gateway) + _ = s.Add("inEvent", origmsg.Event) _ = s.Add("outAccount", br.Account) _ = s.Add("outProtocol", br.Protocol) _ = s.Add("outChannel", msg.Channel) _ = s.Add("outGateway", gw.Name) + _ = s.Add("outEvent", msg.Event) _ = s.Add("msgText", msg.Text) _ = s.Add("msgUsername", msg.Username) c, err := s.Compile() diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample index 93881ad1..7dd12e44 100644 --- a/matterbridge.toml.sample +++ b/matterbridge.toml.sample @@ -1478,8 +1478,8 @@ InMessage="example.tengo" # #The script will have the following global variables: #read-only: -#inAccount, inProtocol, inChannel, inGateway -#outAccount, outProtocol, outChannel, outGateway +#inAccount, inProtocol, inChannel, inGateway, inEvent +#outAccount, outProtocol, outChannel, outGateway, outEvent # #read-write: #msgText, msgUsername |