summaryrefslogtreecommitdiffstats
path: root/gateway/bridgemap/bridgemap.go
diff options
context:
space:
mode:
authorDuco van Amstel <helcaraxan@gmail.com>2019-05-30 14:00:40 +0100
committerWim <wim@42.be>2019-05-30 15:00:40 +0200
commitb79bf7d4143f7a962faa00e10c2d6705524607ee (patch)
tree2a0bab3b6c04a94d9d1497b7c974a1aebfdd4867 /gateway/bridgemap/bridgemap.go
parent3724cc3a15c76a0a0dd1cac15736aebb0410d8ca (diff)
downloadmatterbridge-msglm-b79bf7d4143f7a962faa00e10c2d6705524607ee.tar.gz
matterbridge-msglm-b79bf7d4143f7a962faa00e10c2d6705524607ee.tar.bz2
matterbridge-msglm-b79bf7d4143f7a962faa00e10c2d6705524607ee.zip
Forward only user-typing messages if supported by protocol (#832)
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.
Diffstat (limited to 'gateway/bridgemap/bridgemap.go')
-rw-r--r--gateway/bridgemap/bridgemap.go66
1 files changed, 36 insertions, 30 deletions
diff --git a/gateway/bridgemap/bridgemap.go b/gateway/bridgemap/bridgemap.go
index 1ad013ed..6ce7157f 100644
--- a/gateway/bridgemap/bridgemap.go
+++ b/gateway/bridgemap/bridgemap.go
@@ -3,35 +3,41 @@ package bridgemap
import (
"github.com/42wim/matterbridge/bridge"
"github.com/42wim/matterbridge/bridge/api"
- "github.com/42wim/matterbridge/bridge/discord"
- "github.com/42wim/matterbridge/bridge/gitter"
- "github.com/42wim/matterbridge/bridge/irc"
- "github.com/42wim/matterbridge/bridge/matrix"
- "github.com/42wim/matterbridge/bridge/mattermost"
- "github.com/42wim/matterbridge/bridge/rocketchat"
- "github.com/42wim/matterbridge/bridge/slack"
- "github.com/42wim/matterbridge/bridge/sshchat"
- "github.com/42wim/matterbridge/bridge/steam"
- "github.com/42wim/matterbridge/bridge/telegram"
- "github.com/42wim/matterbridge/bridge/whatsapp"
- "github.com/42wim/matterbridge/bridge/xmpp"
- "github.com/42wim/matterbridge/bridge/zulip"
+ bdiscord "github.com/42wim/matterbridge/bridge/discord"
+ bgitter "github.com/42wim/matterbridge/bridge/gitter"
+ birc "github.com/42wim/matterbridge/bridge/irc"
+ bmatrix "github.com/42wim/matterbridge/bridge/matrix"
+ bmattermost "github.com/42wim/matterbridge/bridge/mattermost"
+ brocketchat "github.com/42wim/matterbridge/bridge/rocketchat"
+ bslack "github.com/42wim/matterbridge/bridge/slack"
+ bsshchat "github.com/42wim/matterbridge/bridge/sshchat"
+ bsteam "github.com/42wim/matterbridge/bridge/steam"
+ btelegram "github.com/42wim/matterbridge/bridge/telegram"
+ bwhatsapp "github.com/42wim/matterbridge/bridge/whatsapp"
+ bxmpp "github.com/42wim/matterbridge/bridge/xmpp"
+ bzulip "github.com/42wim/matterbridge/bridge/zulip"
)
-var FullMap = 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-legacy": bslack.NewLegacy,
- "slack": bslack.New,
- "sshchat": bsshchat.New,
- "steam": bsteam.New,
- "telegram": btelegram.New,
- "whatsapp": bwhatsapp.New,
- "xmpp": bxmpp.New,
- "zulip": bzulip.New,
-}
+var (
+ FullMap = 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-legacy": bslack.NewLegacy,
+ "slack": bslack.New,
+ "sshchat": bsshchat.New,
+ "steam": bsteam.New,
+ "telegram": btelegram.New,
+ "whatsapp": bwhatsapp.New,
+ "xmpp": bxmpp.New,
+ "zulip": bzulip.New,
+ }
+
+ UserTypingSupport = map[string]struct{}{
+ "slack": {},
+ }
+)