matterbridge/vendor/github.com
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
2019-02-23 16:39:44 +01:00
..
42wim/go-gitter Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
Baozisoftware/qrcode-terminal-go Add initial WhatsApp support (#711) 2019-02-21 20:28:13 +01:00
bwmarrin/discordgo Switch back go upstream bwmarrin/discordgo 2018-11-13 00:02:07 +01:00
d5/tengo Add scripting (tengo) support for every incoming message (#731) 2019-02-23 16:39:44 +01:00
davecgh/go-spew Upgrade logrus / testify to stable versions 2018-11-18 01:10:15 +00:00
dfordsoft/golib Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
dgrijalva/jwt-go Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
fsnotify/fsnotify Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
go-telegram-bot-api/telegram-bot-api Update vendor 2019-01-03 00:07:50 +01:00
golang/protobuf Add initial WhatsApp support (#711) 2019-02-21 20:28:13 +01:00
google/gops Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
gopackage/ddp Refactor and update RocketChat bridge 2019-02-15 18:19:34 +01:00
gorilla Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
hashicorp Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
Jeffail/gabs Refactor and update RocketChat bridge 2019-02-15 18:19:34 +01:00
jpillora/backoff Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
kardianos/osext Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
konsorten/go-windows-terminal-sequences Upgrade logrus / testify to stable versions 2018-11-18 01:10:15 +00:00
labstack Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
lrstanley/girc Add initial WhatsApp support (#711) 2019-02-21 20:28:13 +01:00
magiconair/properties Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
matterbridge Refactor and update RocketChat bridge (#707) 2019-02-15 18:20:32 +01:00
mattermost/mattermost-server Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
mattn Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
mgutz/ansi Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
mitchellh/mapstructure Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
mreiferson/go-httpclient Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
mrexodia/wray Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
nelsonken/gomf Refactor and update RocketChat bridge 2019-02-15 18:19:34 +01:00
nicksnyder/go-i18n Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
nlopes/slack Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
paulrosania/go-charset Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
pborman/uuid Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
pelletier/go-toml Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
peterhellberg/emojilib Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
Philipp15b/go-steam Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
pkg/errors Update nlopes/slack vendor 2018-08-10 00:38:19 +02:00
pmezard/go-difflib Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
Rhymen/go-whatsapp Update vendor 2019-02-23 14:14:29 +01:00
rs/xid Update direct dependencies where possible 2018-11-25 21:21:04 +01:00
russross/blackfriday Update Blackfriday dependency (closes #522) (#532) 2018-10-22 19:48:29 +02:00
saintfish/chardet Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
shazow Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
shurcooL/sanitized_anchor_name Add initial WhatsApp support (#711) 2019-02-21 20:28:13 +01:00
sirupsen/logrus Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
skip2/go-qrcode Add initial WhatsApp support (#711) 2019-02-21 20:28:13 +01:00
spf13 Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
stretchr/testify Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00
technoweenie/multipartstreamer Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
valyala Use mod vendor for vendored directory (backwards compatible) 2018-08-06 21:47:05 +02:00
zfjagann/golang-ring Update vendor, move to labstack/echo/v4 Fixes #698 2019-01-31 17:06:36 +01:00