diff options
author | Wim <wim@42.be> | 2016-11-05 01:11:28 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2016-11-05 01:11:51 +0100 |
commit | 2dbe0eb55729620ffdfdb7e4f10003564d79c7e1 (patch) | |
tree | 65e5309a42c1cee478b5b0c8448c36d819c9d41a /gateway | |
parent | 50a0df427927b60724d8e6e00ba06822e0aa7308 (diff) | |
download | matterbridge-msglm-2dbe0eb55729620ffdfdb7e4f10003564d79c7e1.tar.gz matterbridge-msglm-2dbe0eb55729620ffdfdb7e4f10003564d79c7e1.tar.bz2 matterbridge-msglm-2dbe0eb55729620ffdfdb7e4f10003564d79c7e1.zip |
Add support for dynamic IconURL (slack). Closes #43
Diffstat (limited to 'gateway')
-rw-r--r-- | gateway/gateway.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index 7cf995b6..13b6be1b 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -117,7 +117,6 @@ func (gw *Gateway) handleMessage(msg config.Message, dest bridge.Bridge) { log.Debug("empty channel") return } - gw.modifyMessage(&msg, dest) log.Debugf("Sending %#v from %s (%s) to %s (%s)", msg, msg.FullOrigin, originchannel, dest.FullOrigin(), channel) err := dest.Send(msg) if err != nil { @@ -144,16 +143,9 @@ func (gw *Gateway) modifyMessage(msg *config.Message, dest bridge.Bridge) { if strings.ToLower(typeField.Name) == dest.Protocol() { // get the Protocol struct from the map protoCfg := val.Field(i).MapIndex(reflect.ValueOf(dest.Origin())) - setNickFormat(msg, protoCfg.Interface().(config.Protocol)) + //config.SetNickFormat(msg, protoCfg.Interface().(config.Protocol)) val.Field(i).SetMapIndex(reflect.ValueOf(dest.Origin()), protoCfg) break } } } - -func setNickFormat(msg *config.Message, cfg config.Protocol) { - format := cfg.RemoteNickFormat - msg.Username = strings.Replace(format, "{NICK}", msg.Username, -1) - msg.Username = strings.Replace(msg.Username, "{BRIDGE}", msg.Origin, -1) - msg.Username = strings.Replace(msg.Username, "{PROTOCOL}", msg.Protocol, -1) -} |