2
0
mirror of https://github.com/42wim/matterbridge synced 2024-11-15 06:12:55 +00:00
matterbridge/gateway
Wim 2d277a15f5
Add scripting (tengo) support for every outgoing message (#806)
Adds a new key OutMessage under [tengo] table, which specifies the location of the script that
will be invoked on each message being sent to a bridge and can be used to modify the Username
and the Text of that message.

The script will have the following global variables:
read-only:
inAccount, inProtocol, inChannel, inGateway
outAccount, outProtocol, outChannel, outGateway

read-write:
msgText, msgUsername

The script is reloaded on every message, so you can modify the script on the fly.

The default script in https://github.com/42wim/matterbridge/tree/master/internal/tengo/outmessage.tengo
is compiled in and will be executed if no script is specified.
2019-04-19 18:27:31 +02:00
..
bridgemap Add initial WhatsApp support (#711) 2019-02-21 20:28:13 +01:00
samechannel Make all loggers derive from non-default instance (#728) 2019-02-23 22:51:27 +01:00
bench.tengo Add scripting (tengo) support for every incoming message (#731) 2019-02-23 16:39:44 +01:00
gateway_test.go Make all loggers derive from non-default instance (#728) 2019-02-23 22:51:27 +01:00
gateway.go Add scripting (tengo) support for every outgoing message (#806) 2019-04-19 18:27:31 +02:00
handlers_test.go Support rewriting messages from relaybots using ExtractNicks. Fixes #466 (#730) 2019-02-23 16:35:54 +01:00
handlers.go Make all loggers derive from non-default instance (#728) 2019-02-23 22:51:27 +01:00
router.go Handle file upload/download only once for each message (#742) 2019-02-27 20:52:05 +01:00