From e19ba5a06ad94c389df1b253d30c9ba6e4d14273 Mon Sep 17 00:00:00 2001 From: Duco van Amstel Date: Tue, 13 Nov 2018 19:51:19 +0000 Subject: Add new Slack connection and forked legacy Slack bridge (#582) --- gateway/gateway.go | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'gateway') diff --git a/gateway/gateway.go b/gateway/gateway.go index 728ed703..9baeef9e 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -2,10 +2,15 @@ package gateway import ( "bytes" + "crypto/sha1" "fmt" "io/ioutil" "net/http" "os" + "path/filepath" + "regexp" + "strings" + "time" "github.com/42wim/matterbridge/bridge" "github.com/42wim/matterbridge/bridge/api" @@ -23,15 +28,8 @@ import ( bxmpp "github.com/42wim/matterbridge/bridge/xmpp" bzulip "github.com/42wim/matterbridge/bridge/zulip" "github.com/hashicorp/golang-lru" - log "github.com/sirupsen/logrus" - // "github.com/davecgh/go-spew/spew" - "crypto/sha1" - "path/filepath" - "regexp" - "strings" - "time" - "github.com/peterhellberg/emojilib" + log "github.com/sirupsen/logrus" ) type Gateway struct { @@ -55,19 +53,20 @@ type BrMsgID struct { var flog *log.Entry var bridgeMap = map[string]bridge.Factory{ - "api": api.New, - "discord": bdiscord.New, - "gitter": bgitter.New, - "irc": birc.New, - "mattermost": bmattermost.New, - "matrix": bmatrix.New, - "rocketchat": brocketchat.New, - "slack": bslack.New, - "sshchat": bsshchat.New, - "steam": bsteam.New, - "telegram": btelegram.New, - "xmpp": bxmpp.New, - "zulip": bzulip.New, + "api": api.New, + "discord": bdiscord.New, + "gitter": bgitter.New, + "irc": birc.New, + "mattermost": bmattermost.New, + "matrix": bmatrix.New, + "rocketchat": brocketchat.New, + "slack-legacy": bslack.NewLegacy, + "slack": bslack.New, + "sshchat": bsshchat.New, + "steam": bsteam.New, + "telegram": btelegram.New, + "xmpp": bxmpp.New, + "zulip": bzulip.New, } const ( -- cgit v1.2.3