mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-18 09:02:39 +01:00
Add msg event to tengo
This commit is contained in:
parent
f04d360ee2
commit
bd0e81f5a0
@ -572,10 +572,12 @@ func (gw *Gateway) modifySendMessageTengo(origmsg *config.Message, msg *config.M
|
|||||||
_ = s.Add("inProtocol", origmsg.Protocol)
|
_ = s.Add("inProtocol", origmsg.Protocol)
|
||||||
_ = s.Add("inChannel", origmsg.Channel)
|
_ = s.Add("inChannel", origmsg.Channel)
|
||||||
_ = s.Add("inGateway", origmsg.Gateway)
|
_ = s.Add("inGateway", origmsg.Gateway)
|
||||||
|
_ = s.Add("inEvent", origmsg.Event)
|
||||||
_ = s.Add("outAccount", br.Account)
|
_ = s.Add("outAccount", br.Account)
|
||||||
_ = s.Add("outProtocol", br.Protocol)
|
_ = s.Add("outProtocol", br.Protocol)
|
||||||
_ = s.Add("outChannel", msg.Channel)
|
_ = s.Add("outChannel", msg.Channel)
|
||||||
_ = s.Add("outGateway", gw.Name)
|
_ = s.Add("outGateway", gw.Name)
|
||||||
|
_ = s.Add("outEvent", msg.Event)
|
||||||
_ = s.Add("msgText", msg.Text)
|
_ = s.Add("msgText", msg.Text)
|
||||||
_ = s.Add("msgUsername", msg.Username)
|
_ = s.Add("msgUsername", msg.Username)
|
||||||
c, err := s.Compile()
|
c, err := s.Compile()
|
||||||
|
@ -1478,8 +1478,8 @@ InMessage="example.tengo"
|
|||||||
#
|
#
|
||||||
#The script will have the following global variables:
|
#The script will have the following global variables:
|
||||||
#read-only:
|
#read-only:
|
||||||
#inAccount, inProtocol, inChannel, inGateway
|
#inAccount, inProtocol, inChannel, inGateway, inEvent
|
||||||
#outAccount, outProtocol, outChannel, outGateway
|
#outAccount, outProtocol, outChannel, outGateway, outEvent
|
||||||
#
|
#
|
||||||
#read-write:
|
#read-write:
|
||||||
#msgText, msgUsername
|
#msgText, msgUsername
|
||||||
|
Loading…
Reference in New Issue
Block a user