summaryrefslogtreecommitdiffstats
path: root/gateway
Commit message (Collapse)AuthorAgeFilesLines
* Add support for irc to irc notice (irc). Fixes #754 (#1305)Wim2020-11-221-0/+5
|
* Add extra debug to log time spent sending a message per bridge (#1299)Wim2020-11-221-0/+4
|
* Allow tengo to drop messages using msgDrop (#1272)Wim2020-10-211-10/+31
|
* Show deprecate warnings about old tengo settings (#1271)Wim2020-10-212-6/+19
|
* Add Mumble support (#1245)Sebastian P2020-10-011-0/+11
|
* Add Nextcloud Talk support (#1167)Gary Kim2020-07-181-0/+11
| | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Lowercase account names. Fixes #1108 (#1110)Wim2020-04-211-1/+1
|
* Fix the behavior of ShowTopicChange and SyncTopic (#1086)ldruschk2020-04-181-1/+1
| | | | | | | | Currently, the "topic_change" events are ignored if both, ShowTopicChange and SyncTopic are set, and forwarded otherwise. This pull requests changes the behavior such that the events are only forwarded if one of those two config options is set to true and ignored otherwise.
* Implement User Avatar spoofing of XMPP users (#1090)Alexander2020-04-161-1/+1
| | | * Implement User Avatar spoofing of XMPP users
* Add support for build tags (#1054)Qais Patankar2020-03-2217-40/+181
| | | | | | | | By default all bridges are available. You can turn off certain bridges by providing e.g. "nodiscord" as a build tag. go build -tags nomsteams,noapi
* Add initial Microsoft Teams supportWim2020-03-011-0/+2
| | | | Documentation on https://github.com/42wim/matterbridge/wiki/MS-Teams-setup
* Add ability to procure avatars from the destination bridge (#1000)Qais Patankar2020-02-092-2/+4
| | | | | | | | | | | | * remote_avatar: add UseLocalAvatar * remote_avatar: make sure msg.Protocol is always set correctly * remote_avatars: support msg.Account * remote_avatar: add to matterbridge.toml.sample * remote_avatar: clarify something
* Update to tengo v2 (#976)Wim2020-01-091-5/+5
|
* Switch to new emoji library kyokomi/emoji (#948)Wim2019-11-171-2/+2
|
* Add UserTypingSupport (discord) (#914)Qais Patankar2019-10-041-1/+2
| | | | | | | | * Add Discord to UserTypingSupport * discord: start typing in a channel on EventUserTyping receive * discord: emit EventUserTyping to gateway
* Do configuration validation on start-up. Fixes #888 (#889)Wim2019-09-093-1/+33
| | | | | | Fail if: * we don't have any gateways configured * we have gateways configured but with non-existing bridge configuration * we have gateways configured without any configuration
* Add initial Keybase Chat support (#877)cori hudson2019-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial work on native keybase bridging * Hopefully make a functional keybase bridge * add keybase to bridgemap * send to right channel, try to figure out received msgs * add account and userid * i am a Dam Fool * Fix formatting for messages, handle /me * update vendors, ran golint and goimports * move handlers to handlers.go, clean up unused config options * add sample config, fix inconsistent remote nick handling * Update readme with keybase links * Resolve fixmie errors * Error -> Errorf * fix linting errors in go.mod and go.sum * explicitly join channels, ignore messages from non-specified channels * check that team names match before bridging message
* Support webhook message deletions (discord) (#853)Qais Patankar2019-07-081-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support webhook message deletions (discord) Messages sent via webhook can now be deleted. It seems it can do this without any special permissions. This copies discordgo.WebhookExecute and makes it support the returning of discordgo.Message. A pull request has been sent upstream, so we should use that if @bwmariin accepts the pull request: https://github.com/bwmarrin/discordgo/pull/663 Changes in behaviour (webhook mode only): - Previously messages *edited* on other platforms would just be retransmitted as a brand new message to Discord. - Message *edits* will now be ignored. - Debug: message edits will now print out a "permission error". In the future it may be good to send an "message edited" react to those webhook messages, so at least people know that the message was edited on other platforms. (Even though it can't actually show the new message.) Alternatively, message edits could just send a brand new message with a link back to the old one. This is a little ugly but it would ensure that Discord users are able to see the edited message. These "message edit notifications" would be sent from the bot user (not from a webhook), so we could edit the "edit notification" if subsequent edits to the original message are made.
* Forward only user-typing messages if supported by protocol (#832)Duco van Amstel2019-05-302-30/+45
| | | | | | | | | | Fixes issue #814. This is a somewhat hacky way of achieving the required goal but it seems like this is the least problematic way of getting there. We might want to redesign some bridge information later such that we have a standardised way of specifying what is and what isn't supported by each chat protocol / bridge.
* Add msg event to tengoWim2019-04-241-0/+2
|
* Add scripting (tengo) support for every outgoing message (#806)Wim2019-04-191-0/+45
| | | | | | | | | | | | | | | | | | 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.
* Add tengo support to RemoteNickFormat (#793)Wim2019-04-081-0/+41
| | | | | | | | | | | | | | | | | | | This commit add support for using the result of a tengo script in RemoteNickFormat using {TENGO} Also adds a new toml table [tengo] with key RemoteNickFormat and value location of the script. This also moves the TengoModifyMessage from [general] to Message in [tengo] Documentation: RemoteNickFormat allows you to specify the location of a tengo (https://github.com/d5/tengo/) script. The script will have the following global variables: to modify: result to read: channel, bridge, gateway, protocol, nick The result will be set in {TENGO} in the RemoteNickFormat key of every bridge where {TENGO} is specified 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/contrib/remotenickformat.tengo [tengo] RemoteNickFormat="remotenickformat.tengo"
* Revert fix for #722. Closes #781Wim2019-04-061-17/+0
| | | | | | | | | | | | | | Revert "Fix typo" This reverts commit dffd67eb311580aa2b14e7f5a069cfefdbf3aacc. Revert "Handle quit message relay better on gateways with one channel on the irc bridge #722" This reverts commit 240559581a225ff632c00a52e029b3728c61309e. Revert "Support quits from irc correctly. Fixes #722 (#724)" This reverts commit d76a04bd0a96772cec5b279aaa1ee45235adc707.
* Update tengo vendor and load the stdlib. Fixes #789 (#792)Wim2019-04-061-0/+2
|
* Need to specify /topic:mytopic for channel configuration (zulip). (#751)Wim2019-03-021-0/+4
| | | | | | | | | | | | | | Breaking change for zulip channel configuration. For zulip the channel configuration will now need to specify also the topic with /topic:yourtopic. Example: [[gateway.inout]] account="zulip.streamchat" channel="general/topic:mytopic" This fixes the incorrect PR #701 which didn't work with multiple gateways.
* Handle file upload/download only once for each message (#742)Wim2019-02-271-1/+5
|
* Fail gracefully on incorrect human input. Fixes #739 (#740)Wim2019-02-261-0/+3
|
* Make all loggers derive from non-default instance (#728)Wim2019-02-236-102/+157
|
* Add scripting (tengo) support for every incoming message (#731)Wim2019-02-233-0/+46
| | | | | | | | | | | | | | | | | | | | | | 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
* Support rewriting messages from relaybots using ExtractNicks. Fixes #466 (#730)Wim2019-02-233-0/+116
| | | | | | | | | | some examples: this replaces a message like "Relaybot: <relayeduser> something interesting" to "relayeduser: something interesting" ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ] ] you can use multiple entries for multiplebots this also replaces a message like "otherbot: (relayeduser) something else" to "relayeduser: something else" ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ],[ "otherbot","\\((.*?)\\)\\s+" ] OPTIONAL (default empty) ExtractNicks=[ ["otherbot","<(.*?)>\\s+" ] ]
* Disable updateChannelMembers for nowWim2019-02-211-1/+1
|
* Fix typoWim2019-02-211-1/+1
|
* Add initial WhatsApp support (#711)Krzysiek Madejski2019-02-211-0/+2
|
* Handle quit message relay better on gateways with one channel on the irc ↵Wim2019-02-211-0/+5
| | | | bridge #722
* Fix bug in #721Wim2019-02-171-2/+2
|
* Support quits from irc correctly. Fixes #722 (#724)Wim2019-02-171-1/+17
|
* Support join/leaves from discord. Closes #654 (#721)Wim2019-02-171-0/+12
|
* Allow regexs in ignoreNicks. Closes #690 (#720)Wim2019-02-172-45/+33
|
* Hint at thread replies when messages are unthreaded (slack) (#684)Wim2019-02-101-0/+6
|
* Send GetChannelMembers event only to slack for nowWim2019-01-241-0/+4
|
* Add initial support for getting ChannelMember info of all bridges (#678)Wim2019-01-182-0/+39
| | | | | | | | | | | | | | * Add initial support for getting ChannelMember info of all bridges. Adds an EventGetChannelMembers event, which gets send every x time to all bridges. Bridges should respond on this event with a Message containing ChannelMembers in the EventGetChannelMembers key in the Extra field. handleEventGetChannelMembers will handle this Message and sets the contained ChannelMembers to the Bridge struct. * Add ChannelMembers support to the slack bridge
* Fail if channel starts with hashtag (mattermost). Closes #625Wim2019-01-071-0/+5
|
* Use logrus imports instead of log (#662)Duco van Amstel2018-12-263-9/+8
|
* Refactor gateway (#648)Wim2018-12-124-237/+435
| | | | | | | * Decrease complexity of handleMessage, handleReceive, handleFiles * Move handlers to handlers.go * Split ignoreMessage up in ignoreTextEmpty, ignoreNicks and IgnoreTexts * Add ignoreEvent * Add testcase for ignoreTextEmpty, ignoreNicks, ignoreTexts and ignoreEvent
* Enable gosec linter (#645)Duco van Amstel2018-12-061-2/+2
|
* Tidy up fetching of config values. (#616)Patrick Connolly2018-12-011-12/+6
|
* Extract bridgeMap into own package to improve testability (#601)Patrick Connolly2018-11-304-33/+41
|
* Sync channel topics between Slack bridges (#585)Patrick Connolly2018-11-261-2/+4
| | | Added logic to allow for configurable synchronisation of topics and purposes of channels between Slack bridges.
* Add option to ignore failing bridge on start. Fixes #455 (#603)Wim2018-11-251-2/+31
|
* Add protocol to msg.ID in cache (#596)Wim2018-11-192-12/+12
|