master
updatexmppp
fix-1540
usemautrixlib
addtengodownload
rocketchat-reconnect
discord-webhook-fixes
v0.1
v0.10.0
v0.10.1
v0.10.2
v0.10.2-dev
v0.10.3
v0.11.0
v0.11.0-beta1
v0.11.0-beta2
v0.11.0-beta3
v0.12.0
v0.12.1
v0.13.0
v0.14.0
v0.15.0
v0.16.0
v0.16.0-rc1
v0.16.0-rc2
v0.16.1
v0.16.2
v0.16.3
v0.2
v0.3
v0.4
v0.4.1
v0.4.2
v0.5.0
v0.5.0-beta1
v0.5.0-beta2
v0.6.0-beta1
v0.6.0-beta2
v0.6.1
v0.7.0
v0.7.1
v0.8.0
v0.8.1
v0.9.0
v0.9.1
v0.9.2
v0.9.3
v1.0.0
v1.0.0-rc1
v1.0.1
v1.1.0
v1.1.1
v1.1.2
v1.10.0
v1.10.1
v1.11.0
v1.11.1
v1.11.2
v1.11.3
v1.12.0
v1.12.1
v1.12.2
v1.12.3
v1.13.0
v1.13.1
v1.14.0
v1.14.0-rc1
v1.14.0-rc2
v1.14.1
v1.14.2
v1.14.3
v1.14.4
v1.15.0
v1.15.1
v1.16.0
v1.16.1
v1.16.2
v1.16.3
v1.16.4
v1.16.5
v1.17.0
v1.17.1
v1.17.2
v1.17.3
v1.17.4
v1.17.5
v1.18.0
v1.18.1
v1.18.2
v1.18.3
v1.19.0
v1.2.0
v1.20.0
v1.21.0
v1.22.0
v1.22.1
v1.22.2
v1.22.3
v1.23.0
v1.23.1
v1.23.2
v1.24.0
v1.24.1
v1.25.0
v1.25.1
v1.25.2
v1.26.0
v1.3.0
v1.3.1
v1.4.0
v1.4.1
v1.5.0
v1.5.1
v1.6.0
v1.6.1
v1.6.2
v1.6.3
v1.7.0
v1.7.1
v1.8.0
v1.9.0
v1.9.1
${ noResults }
1 Commits (5847f7758ce0e9fbad53766efe495d7ba15adae4)
Author | SHA1 | Message | Date |
---|---|---|---|
Wim |
1bb39eba87
|
Add scripting (tengo) support for every incoming message (#731)
TengoModifyMessage allows you to specify the location of a tengo (https://github.com/d5/tengo/) script. This script will receive every incoming message and can be used to modify the Username and the Text of that message. The script will have the following global variables: to modify: msgUsername and msgText to read: msgChannel and msgAccount The script is reloaded on every message, so you can modify the script on the fly. Example script can be found in https://github.com/42wim/matterbridge/tree/master/gateway/bench.tengo and https://github.com/42wim/matterbridge/tree/master/contrib/example.tengo The example below will check if the text contains blah and if so, it'll replace the text and the username of that message. text := import("text") if text.re_match("blah",msgText) { msgText="replaced by this" msgUsername="fakeuser" } More information about tengo on: https://github.com/d5/tengo/blob/master/docs/tutorial.md and https://github.com/d5/tengo/blob/master/docs/stdlib.md |
6 years ago |